Basic Transform Task: Regular Expression to Remove Emoji from Open Text Entry Verbatim | XM Community
Skip to main content

I am working with the basic transform task in a workflow to export survey responses daily. We are using the basic transform tasks Replace function to strip out any emoji from the response and replace with an asterisk *. The replace functionality has a Regular Expression option to find text via regex. I currently have the following expression in my Replace Value transformation.

 

((\x{2700}-\x{27BF}]||\x{E000}-\x{F8FF}]|\x{D83C}}\x{DC00}-\x{DFFF}]|\x{D83D}}\x{DC00}-\x{DFFF}]||\x{2011}-\x{2017}]||\x{201A}-\x{201B}]||\x{201E}-\x{26FF}]|\x{D83E}}\x{DD10}-\x{DDFF}])

 

 

Most emoji are getting successfully masked, but there are some that are not getting masked. See the emoji below.

 

💥,👍,🤬,👍,🥰,🥳,🤕

 

I used Regex101.com to confirm, and it looks like these emoji should be matching the regex we have right now. Anyone dealt with a similar issue or know of a better regex to use for identifying all emoji?

 

 

Be the first to reply!

Leave a Reply