Regular Expression to remove emojis from text input

Certified Associate Developer

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 WinkOk handBlushRoflUnamused 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