Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Find and replace all emoticons in text field

Topic Labels: Formulas
Solved
Jump to Solution
4209 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Zion_Brock
6 - Interface Innovator
6 - Interface Innovator

Is there any way to search for emoticons (any of them) in a text field, and replace with something like a dash or space? Is there a code for emoticon that allows a formula to search for this?

Emojis and emoticons are often put into titles of blogs, but I am curating titles and creating url’s out of them, but want to remove any trace of these.

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

This is a great use case for regular expressions, and the regex engine that Airtable uses supports the [[:ascii:]] character class, which will only match normal ASCII characters: letters, numbers, and limited special characters, but no emojis. This formula will replace anything not in that category with an empty string, but you can use whatever substitute character you prefer.

REGEX_REPLACE(Title, "[^[:ascii:]] *", "")

Screen Shot 2021-09-04 at 12.15.10 PM

See Solution in Thread

4 Replies 4
Justin_Barrett
18 - Pluto
18 - Pluto

This is a great use case for regular expressions, and the regex engine that Airtable uses supports the [[:ascii:]] character class, which will only match normal ASCII characters: letters, numbers, and limited special characters, but no emojis. This formula will replace anything not in that category with an empty string, but you can use whatever substitute character you prefer.

REGEX_REPLACE(Title, "[^[:ascii:]] *", "")

Screen Shot 2021-09-04 at 12.15.10 PM

Zion_Brock
6 - Interface Innovator
6 - Interface Innovator

This was exactly what I needed. You da man! Thank you soooooo much. :slightly_smiling_face:

MRauscher
4 - Data Explorer
4 - Data Explorer

Hi everyone, 

Thank you very much for the formula.

However, it also removes accents.
My canadien customer René now has a first name of Ren.

Is there a way to remove emojis and keep accents ?

Partyborn
6 - Interface Innovator
6 - Interface Innovator

This works even better for me:

REGEX_MATCH(Titel, '[^\\u0000-\\ud7ff\\ue000-\\uffff]')