mathiasbynens / emoji-regex

A regular expression to match all Emoji-only symbols as per the Unicode Standard.
https://mths.be/emoji-regex
MIT License
1.73k stars 174 forks source link

Not sure if this regex does what you want #56

Closed LouisMichael closed 5 years ago

LouisMichael commented 5 years ago

I was looking through some project regex and found this one here. It seems to be trying to use \p{ to express a unicode value but this notation is not supported in the JS regex dialect and will most likely not behave as expected when interacting with the u flag.

mathiasbynens commented 5 years ago

It seems to be trying to use \p{ to express a unicode value but this notation is not supported in the JS regex dialect

It does: https://mathiasbynens.be/notes/es-unicode-property-escapes

The distributed version of this library is transpiled code that doesn’t use the \p{} notation (since it’s not yet supported in all modern browsers).

binyamin commented 3 years ago

The distributed version of this library is transpiled code that doesn’t use the \p{} notation (since it’s not yet supported in all modern browsers).

@mathiasbynens It works in Node.js v10.23.0 (the earliest supported LTS). Can there be a note on the readme, in case the use-case is only server-side?