Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const string = 'Mis frutas favoritas son: 🐻, 🙂, 🍎, 🍌 y 🍍. Me parecen deliciosas.';
- const resultado = string.match(/\ud83c[\udf00-\udfff]|\ud83d[\udc00-\ude4f]|\ud83d[\ude80-\udeff]/g).join('');
- console.log(resultado);
- // Output: 🐻🙂🍎🍌🍍
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement