For example:
Hello! :) It's a good day to-day :D 'Aight? <3
It would return:
- Hello
- 🙂
- It’s
- a
- good
- day
- to-day
- 😀
- ‘Aight
- <3
One may consider all emoticons to be two characters long…also, if it helps, only ‘forwards’ emoticons would probably be encountered.
The case without emoticons is trivial, but with them — as well as stripping out punctuation of other words — is sort of tripping me up.
Is there an quick way besides .split and running a block to check each word logically?
The following regex should find any words (without punctuation other than a dash/single-quote/underscore), or a 2-character emoticon:
Regex Explained: