(You\'ll need Firefox or Safari to see the emoji in the code.)
I want to take a string of emoji and do something with the individual characters.
In JavaScript
It can be done using the u flag of a regular expression. The regular expression is:
/.*?/u
This is broken every time there are there are at least minimally zero or more characters that may or may not be emojis, but cannot be spaces or new lines break.
? (split in zero chars)*./uBy using the question mark ? I am forcing to cut exactly every zero chars, otherwise /.*/u it cuts by all characters until I find a space or newline break.