Skip to content

Emoji-related unicode character classes not recognized. #226

Open
@JohnXLivingston

Description

@JohnXLivingston

Hello,

It seems that following character classes are not supported by node-re2, although there are supported by Javascript RegExp: \p{Emoji}, \p{Emoji_Component}, \p{Emoji_Modifier}

See this session in the interractive node CLI:

> const RE2 = await import("re2")
undefined
> new RE2.default(/\p{Emoji}/)
Uncaught SyntaxError: invalid character class range: \p{Emoji}
> new RE2.default(/\p{Emoji_Component}/)
Uncaught SyntaxError: invalid character class range: \p{Emoji_Component}
> new RE2.default(/\p{Emoji_Modifier}/)
Uncaught SyntaxError: invalid character class range: \p{Emoji_Modifier}

> new RegExp(/\p{Emoji}/)
/\p{Emoji}/

Can't find anything about Emojis in RE2 documentation.
Do you know if there is any chance to have it work in node-re2?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions