I’m trying to remove certain emoticons from a string, but I can’t figure out how to match emoticons consisting of special characters and letters, for example 😀 or 😀 (it works for emoticons like “:-)” ). I tried
$message =~ s/\:D//;
and few other variations, but nothing seems to work. Where am I wrong?
EDIT: I was actually stupid and didn’t realize I made all the letters lowercase before this command, so all the emoticons were already changed to “:d”. Thanks for help.
You can write some unit tests:
Then you can do the rest using trial and error.