I want to detect the emojis in the texts. And I want to split the text, keeping these emojis. Because emojis and texts should be in different sizes in text fields.

I use a Regex in Flutter for this. But it breaks some emojis too far as below Example:

RegExp regex = RegExp("((?<=(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*)|(?=(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*))");

String myText = 'Hello 🇦🇨 Normal Skin 🤚  Dark Skin 👈🏾 Anything';

List<String> tryList = tryText.split(regex); 

print(tryList); // [Hello , 🇦, 🇨,  Normal Skin , 🤚,   Dark Skin , 👈, 🏾,  Anything]

It looks like this as a result of its operations. To be more descriptive, the expected result should look like this. Since some emojis are made up of many characters, how can you write a regex that will split them less?

List<String> currentResult = [Hello , 🇦, 🇨,  Normal Skin , 🤚,   Dark Skin , 👈, 🏾,  Anything];
List<String> hopedResult = [Hello ,🇦🇨, Normal Skin ,🤚,  Dark Skin ,👈🏾, Anything];

enter image description here

If anyone wants to work on it, here are the trial codes.

import 'package:flutter/material.dart';

EmojiDetect extends StatefulWidget {
  @override
  _EmojiDetectState createState() => _EmojiDetectState();
}

class _EmojiDetectState extends State<EmojiDetect> {
  RegExp regex = RegExp("((?<=(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*)|(?=(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*))");

   String tryText = 'Hello 🇦🇨 Normal Skin 🤚  Dark Skin 👈🏾 Anything';

 @override
 Widget build(BuildContext context) {
  List<String> tryList = tryText.split(regex);
  print(tryList);

 return Scaffold(
  appBar: AppBar(
    title: Text('Emoji Detect'),
  ),

  body: Column(
    mainAxisAlignment: MainAxisAlignment.spaceEvenly,

    children: [
      Text(tryText, style: TextStyle(fontSize: 24, color: Colors.black), textAlign: TextAlign.center,),

      RichText(
        textAlign: TextAlign.center,
        text: TextSpan(
            children: tryList.map((e) => TextSpan(text: e, style: TextStyle(fontSize: 24, color: Colors.black))).toList(),
        ),
      ),
    ],
  ),
);
}}


Solution 1: Stefano Amorelli

You can use the following function to split the string by emojis:

List<String> splitByEmoji(String text) {

  //RegEx from: https://github.com/i-Naji/emojis
  final regex = RegExp(
      '(\u{D83C}\u{DFF4}\u{DB40}\u{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}\u{DCBC}\u{DD27}\u{DD2C}\u{DE80}\u{DE92}]|\u{D83E}[\u{DDAF}-\u{DDB3}\u{DDBC}\u{DDBD}])|\u{D83C}\u{DFFC}\u{200D}(?:\u{D83E}\u{DD1D}\u{200D}\u{D83D}\u{DC68}(?:\u{D83C}[\u{DFFB}\u{DFFD}-\u{DFFF}])|\u{D83C}[\u{DF3E}\u{DF73}\u{DF7C}\u{DF93}\u{DFA4}\u{DFA8}\u{DFEB}\u{DFED}]|\u{D83D}[\u{DCBB}\u{DCBC}\u{DD27}\u{DD2C}\u{DE80}\u{DE92}]|\u{D83E}[\u{DDAF}-\u{DDB3}\u{DDBC}\u{DDBD}])|\u{D83C}\u{DFFB}\u{200D}(?:\u{D83E}\u{DD1D}\u{200D}\u{D83D}\u{DC68}(?:\u{D83C}[\u{DFFC}-\u{DFFF}])|\u{D83C}[\u{DF3E}\u{DF73}\u{DF7C}\u{DF93}\u{DFA4}\u{DFA8}\u{DFEB}\u{DFED}]|\u{D83D}[\u{DCBB}\u{DCBC}\u{DD27}\u{DD2C}\u{DE80}\u{DE92}]|\u{D83E}[\u{DDAF}-\u{DDB3}\u{DDBC}\u{DDBD}])|\u{200D}(?:\u{2764}\u{FE0F}\u{200D}(?:\u{D83D}\u{DC8B}\u{200D})?\u{D83D}\u{DC68}|(?:\u{D83D}[\u{DC68}\u{DC69}])\u{200D}(?:\u{D83D}\u{DC66}\u{200D}\u{D83D}\u{DC66}|\u{D83D}\u{DC67}\u{200D}(?:\u{D83D}[\u{DC66}\u{DC67}]))|\u{D83D}\u{DC66}\u{200D}\u{D83D}\u{DC66}|\u{D83D}\u{DC67}\u{200D}(?:\u{D83D}[\u{DC66}\u{DC67}])|(?:\u{D83D}[\u{DC68}\u{DC69}])\u{200D}(?:\u{D83D}[\u{DC66}\u{DC67}])|[\u{2695}\u{2696}\u{2708}]\u{FE0F}|\u{D83D}[\u{DC66}\u{DC67}]|\u{D83C}[\u{DF3E}\u{DF73}\u{DF7C}\u{DF93}\u{DFA4}\u{DFA8}\u{DFEB}\u{DFED}]|\u{D83D}[\u{DCBB}\u{DCBC}\u{DD27}\u{DD2C}\u{DE80}\u{DE92}]|\u{D83E}[\u{DDAF}-\u{DDB3}\u{DDBC}\u{DDBD}])|(?:\u{D83C}\u{DFFF}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{D83C}\u{DFFE}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{D83C}\u{DFFD}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{D83C}\u{DFFC}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{D83C}\u{DFFB}\u{200D}[\u{2695}\u{2696}\u{2708}])\u{FE0F}|\u{D83C}[\u{DFFB}-\u{DFFF}])|\u{D83E}\u{DDD1}(?:(?:\u{D83C}[\u{DFFB}-\u{DFFF}])\u{200D}(?:\u{D83E}\u{DD1D}\u{200D}\u{D83E}\u{DDD1}(?:\u{D83C}[\u{DFFB}-\u{DFFF}])|\u{D83C}[\u{DF3E}\u{DF73}\u{DF7C}\u{DF84}\u{DF93}\u{DFA4}\u{DFA8}\u{DFEB}\u{DFED}]|\u{D83D}[\u{DCBB}\u{DCBC}\u{DD27}\u{DD2C}\u{DE80}\u{DE92}]|\u{D83E}[\u{DDAF}-\u{DDB3}\u{DDBC}\u{DDBD}])|\u{200D}(?:\u{D83E}\u{DD1D}\u{200D}\u{D83E}\u{DDD1}|\u{D83C}[\u{DF3E}\u{DF73}\u{DF7C}\u{DF84}\u{DF93}\u{DFA4}\u{DFA8}\u{DFEB}\u{DFED}]|\u{D83D}[\u{DCBB}\u{DCBC}\u{DD27}\u{DD2C}\u{DE80}\u{DE92}]|\u{D83E}[\u{DDAF}-\u{DDB3}\u{DDBC}\u{DDBD}]))|\u{D83D}\u{DC69}(?:\u{200D}(?:\u{2764}\u{FE0F}\u{200D}(?:\u{D83D}\u{DC8B}\u{200D}(?:\u{D83D}[\u{DC68}\u{DC69}])|\u{D83D}[\u{DC68}\u{DC69}])|\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B}\u{DFED}]|\u{D83D}[\u{DCBB}\u{DCBC}\u{DD27}\u{DD2C}\u{DE80}\u{DE92}]|\u{D83E}[\u{DDAF}-\u{DDB3}\u{DDBC}\u{DDBD}]))|\u{D83D}\u{DC69}\u{D83C}\u{DFFF}\u{200D}\u{D83E}\u{DD1D}\u{200D}(?:\u{D83D}[\u{DC68}\u{DC69}])(?:\u{D83C}[\u{DFFB}-\u{DFFE}])|\u{D83D}\u{DC69}\u{D83C}\u{DFFE}\u{200D}\u{D83E}\u{DD1D}\u{200D}(?:\u{D83D}[\u{DC68}\u{DC69}])(?:\u{D83C}[\u{DFFB}-\u{DFFD}\u{DFFF}])|\u{D83D}\u{DC69}\u{D83C}\u{DFFD}\u{200D}\u{D83E}\u{DD1D}\u{200D}(?:\u{D83D}[\u{DC68}\u{DC69}])(?:\u{D83C}[\u{DFFB}\u{DFFC}\u{DFFE}\u{DFFF}])|\u{D83D}\u{DC69}\u{D83C}\u{DFFC}\u{200D}\u{D83E}\u{DD1D}\u{200D}(?:\u{D83D}[\u{DC68}\u{DC69}])(?:\u{D83C}[\u{DFFB}\u{DFFD}-\u{DFFF}])|\u{D83D}\u{DC69}\u{D83C}\u{DFFB}\u{200D}\u{D83E}\u{DD1D}\u{200D}(?:\u{D83D}[\u{DC68}\u{DC69}])(?:\u{D83C}[\u{DFFC}-\u{DFFF}])|\u{D83D}\u{DC69}\u{200D}\u{D83D}\u{DC66}\u{200D}\u{D83D}\u{DC66}|\u{D83D}\u{DC69}\u{200D}\u{D83D}\u{DC69}\u{200D}(?:\u{D83D}[\u{DC66}\u{DC67}])|(?:\u{D83D}\u{DC41}\u{FE0F}\u{200D}\u{D83D}\u{DDE8}|\u{D83D}\u{DC69}(?:\u{D83C}\u{DFFF}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{D83C}\u{DFFE}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{D83C}\u{DFFD}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{D83C}\u{DFFC}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{D83C}\u{DFFB}\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{200D}[\u{2695}\u{2696}\u{2708}])|\u{D83C}\u{DFF3}\u{FE0F}\u{200D}\u{26A7}|\u{D83E}\u{DDD1}(?:(?:\u{D83C}[\u{DFFB}-\u{DFFF}])\u{200D}[\u{2695}\u{2696}\u{2708}]|\u{200D}[\u{2695}\u{2696}\u{2708}])|\u{D83D}\u{DC3B}\u{200D}\u{2744}|(?:\u{D83C}[\u{DFC3}\u{DFC4}\u{DFCA}]|\u{D83D}[\u{DC6E}\u{DC70}\u{DC71}\u{DC73}\u{DC77}\u{DC81}\u{DC82}\u{DC86}\u{DC87}\u{DE45}-\u{DE47}\u{DE4B}\u{DE4D}\u{DE4E}\u{DEA3}\u{DEB4}-\u{DEB6}]|\u{D83E}[\u{DD26}\u{DD35}\u{DD37}-\u{DD39}\u{DD3D}\u{DD3E}\u{DDB8}\u{DDB9}\u{DDCD}-\u{DDCF}\u{DDD6}-\u{DDDD}])(?:\u{D83C}[\u{DFFB}-\u{DFFF}])\u{200D}[\u{2640}\u{2642}]|(?:\u{26F9}|\u{D83C}[\u{DFCB}\u{DFCC}]|\u{D83D}\u{DD75})(?:\u{FE0F}\u{200D}[\u{2640}\u{2642}]|(?:\u{D83C}[\u{DFFB}-\u{DFFF}])\u{200D}[\u{2640}\u{2642}])|\u{D83C}\u{DFF4}\u{200D}\u{2620}|(?:\u{D83C}[\u{DFC3}\u{DFC4}\u{DFCA}]|\u{D83D}[\u{DC6E}-\u{DC71}\u{DC73}\u{DC77}\u{DC81}\u{DC82}\u{DC86}\u{DC87}\u{DE45}-\u{DE47}\u{DE4B}\u{DE4D}\u{DE4E}\u{DEA3}\u{DEB4}-\u{DEB6}]|\u{D83E}[\u{DD26}\u{DD35}\u{DD37}-\u{DD39}\u{DD3C}-\u{DD3E}\u{DDB8}\u{DDB9}\u{DDCD}-\u{DDCF}\u{DDD6}-\u{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DD74}\u{DD7A}\u{DD90}\u{DD95}\u{DD96}\u{DE4C}\u{DE4F}\u{DEC0}\u{DECC}]|\u{D83E}[\u{DD0C}\u{DD0F}\u{DD18}-\u{DD1C}\u{DD1E}\u{DD1F}\u{DD30}-\u{DD34}\u{DD36}\u{DD77}\u{DDB5}\u{DDB6}\u{DDBB}\u{DDD2}-\u{DDD5}])(?:\u{D83C}[\u{DFFB}-\u{DFFF}])|(?:[\u{231A}\u{231B}\u{23E9}-\u{23EC}\u{23F0}\u{23F3}\u{25FD}\u{25FE}\u{2614}\u{2615}\u{2648}-\u{2653}\u{267F}\u{2693}\u{26A1}\u{26AA}\u{26AB}\u{26BD}\u{26BE}\u{26C4}\u{26C5}\u{26CE}\u{26D4}\u{26EA}\u{26F2}\u{26F3}\u{26F5}\u{26FA}\u{26FD}\u{2705}\u{270A}\u{270B}\u{2728}\u{274C}\u{274E}\u{2753}-\u{2755}\u{2757}\u{2795}-\u{2797}\u{27B0}\u{27BF}\u{2B1B}\u{2B1C}\u{2B50}\u{2B55}]|\u{D83C}[\u{DC04}\u{DCCF}\u{DD8E}\u{DD91}-\u{DD9A}\u{DDE6}-\u{DDFF}\u{DE01}\u{DE1A}\u{DE2F}\u{DE32}-\u{DE36}\u{DE38}-\u{DE3A}\u{DE50}\u{DE51}\u{DF00}-\u{DF20}\u{DF2D}-\u{DF35}\u{DF37}-\u{DF7C}\u{DF7E}-\u{DF93}\u{DFA0}-\u{DFCA}\u{DFCF}-\u{DFD3}\u{DFE0}-\u{DFF0}\u{DFF4}\u{DFF8}-\u{DFFF}]|\u{D83D}[\u{DC00}-\u{DC3E}\u{DC40}\u{DC42}-\u{DCFC}\u{DCFF}-\u{DD3D}\u{DD4B}-\u{DD4E}\u{DD50}-\u{DD67}\u{DD7A}\u{DD95}\u{DD96}\u{DDA4}\u{DDFB}-\u{DE4F}\u{DE80}-\u{DEC5}\u{DECC}\u{DED0}-\u{DED2}\u{DED5}-\u{DED7}\u{DEEB}\u{DEEC}\u{DEF4}-\u{DEFC}\u{DFE0}-\u{DFEB}]|\u{D83E}[\u{DD0C}-\u{DD3A}\u{DD3C}-\u{DD45}\u{DD47}-\u{DD78}\u{DD7A}-\u{DDCB}\u{DDCD}-\u{DDFF}\u{DE70}-\u{DE74}\u{DE78}-\u{DE7A}\u{DE80}-\u{DE86}\u{DE90}-\u{DEA8}\u{DEB0}-\u{DEB6}\u{DEC0}-\u{DEC2}\u{DED0}-\u{DED6}])|(?:[#\\*0-9\\xA9\\xAE\u{203C}\u{2049}\u{2122}\u{2139}\u{2194}-\u{2199}\u{21A9}\u{21AA}\u{231A}\u{231B}\u{2328}\u{23CF}\u{23E9}-\u{23F3}\u{23F8}-\u{23FA}\u{24C2}\u{25AA}\u{25AB}\u{25B6}\u{25C0}\u{25FB}-\u{25FE}\u{2600}-\u{2604}\u{260E}\u{2611}\u{2614}\u{2615}\u{2618}\u{261D}\u{2620}\u{2622}\u{2623}\u{2626}\u{262A}\u{262E}\u{262F}\u{2638}-\u{263A}\u{2640}\u{2642}\u{2648}-\u{2653}\u{265F}\u{2660}\u{2663}\u{2665}\u{2666}\u{2668}\u{267B}\u{267E}\u{267F}\u{2692}-\u{2697}\u{2699}\u{269B}\u{269C}\u{26A0}\u{26A1}\u{26A7}\u{26AA}\u{26AB}\u{26B0}\u{26B1}\u{26BD}\u{26BE}\u{26C4}\u{26C5}\u{26C8}\u{26CE}\u{26CF}\u{26D1}\u{26D3}\u{26D4}\u{26E9}\u{26EA}\u{26F0}-\u{26F5}\u{26F7}-\u{26FA}\u{26FD}\u{2702}\u{2705}\u{2708}-\u{270D}\u{270F}\u{2712}\u{2714}\u{2716}\u{271D}\u{2721}\u{2728}\u{2733}\u{2734}\u{2744}\u{2747}\u{274C}\u{274E}\u{2753}-\u{2755}\u{2757}\u{2763}\u{2764}\u{2795}-\u{2797}\u{27A1}\u{27B0}\u{27BF}\u{2934}\u{2935}\u{2B05}-\u{2B07}\u{2B1B}\u{2B1C}\u{2B50}\u{2B55}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FCC}]|\u{D83D}[\u{DC42}\u{DC43}\u{DC46}-\u{DC50}\u{DC66}-\u{DC78}\u{DC7C}\u{DC81}-\u{DC83}\u{DC85}-\u{DC87}\u{DC8F}\u{DC91}\u{DCAA}\u{DD74}\u{DD75}\u{DD7A}\u{DD90}\u{DD95}\u{DD96}\u{DE45}-\u{DE47}\u{DE4B}-\u{DE4F}\u{DEA3}\u{DEB4}-\u{DEB6}\u{DEC0}\u{DECC}]|\u{D83E}[\u{DD0C}\u{DD0F}\u{DD18}-\u{DD1F}\u{DD26}\u{DD30}-\u{DD39}\u{DD3C}-\u{DD3E}\u{DD77}\u{DDB5}\u{DDB6}\u{DDB8}\u{DDB9}\u{DDBB}\u{DDCD}-\u{DDCF}\u{DDD1}-\u{DDDD}]))');

  List<String> list = [];
  var matches = regex.allMatches(text);
  int pos = 0;
  matches.forEach((match) {
    list.addAll([
      text.substring(pos, match.start),
      match[0],
    ]);
    pos = match.end;
  });
  if (pos != text.length) list.add(text.substring(pos, text.length));
  return list;
}

I suggest checking out the emojis package for many more useful emoji utilities.