Quantcast
Channel: How to delete/detect any emoji as a whole from a string in Flutter? - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Answer by Bilal Şimşek for How to delete/detect any emoji as a whole from a string in Flutter?

$
0
0

if someone need simple solution to remove emojies from string try this.

String str = "hello🇵🇬你们😀😀👨‍👩‍👦"İ    final RegExp REGEX_EMOJI = RegExp(r'(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])');    if(str.contains(REGEX_EMOJI)){       str = str.replaceAll(REGEX_EMOJI,'');     }

Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>