We have freeform paragraph field, where user can enter any text string except the emojis. I have tried some of following regexreplaceall function which works fine to remove emojis but it also removes some of the special chars as well. Any suggestion on how to just eliminate emojis by completely removing it or just replace it with text string.
input: "afs saf sdfa sdf___~!@#$%^&*()_+{}|:<>?"
Function: regexreplaceall("[^\u1F600-\u1F6FF\s]", ri!input, "" )
currentOutput: "afssafsdfasdf___~@^_{}|:<>?"
desireOutput: "afs saf sdfa sdf___~!@#$%^&*()_+{}|:<>?"
Thanks!
Ajay
Discussion posts and replies are publicly visible
For the regex replacing other characters as well, check this post: https://stackoverflow.com/questions/53383475/replace-all-emojis-from-a-given-unicode-string
My first question: Why do you want to remove emojis? Database issues could be solved by switching to a UTF8MB4 collation.
Solution: code() returns the integer number of characters. Then you can remove/replace the required ranges and turn it back into a string using char().