emoji_regex 0.0.5 copy "emoji_regex: ^0.0.5" to clipboard
emoji_regex: ^0.0.5 copied to clipboard

emoji-regex offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard.

example/example.md

import 'package:emoji_regex/emoji_regex.dart';

const text = r"""\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation)
\u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji
\u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base)
\u{1F469}\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier
""";

/// This is the recommended regular expression to use. It matches all
/// emoji recommended for general interchange, as defined via the
/// `RGI_Emoji` property in the Unicode Standard.
/// https://unicode.org/reports/tr51/#def_rgi_set
/// When in doubt, use this!
final regex = emojiRegex();
final matches = regex.allMatches(text);
print("matches ${matches.length}");
matches.forEach((element) {
  print("matche ${element.group(0)} ${element.start} ${element.end}");
});

copied to clipboard
13
likes
160
points
16.7k
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.16 - 2025.03.31

emoji-regex offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on emoji_regex