Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Find and replace all emoticons in text field

Topic Labels: Formulas
Solved
Jump to Solution
490 2
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

2 Replies 2

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

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