Blog posts on "emoji"

< Get back to blog

EN How to Search for Emojis with Regular Expressions

Turns out the documentation on MDN wasn't complete for this piece. But there is such a thing as Unicode property escapes. And I was astonished when i find out there is a shorthand for Emojis in there! I said it wasn't really complete because you need to pass the unicode flag (u ) in your RegExp for this to work. Here's the code snippet. [...] (Notice the u at the end.) And this will be the output: The...