mysqldatabasecharacteremoji

How to remove all emojis from specific table in mysql?


Is there any way to remove all emojis from a specific column in a table in MySQL database?

I have installed Wordpress and one of my admins posted numerous articles including emojis in the content. the number of posts is too many that I cannot remove emojis one by one.

As you may know, emojis start with 'U+1F' Unicode characters, Is there any kind of regex pattern to remove/replace all of these characters with an space character?


Solution

  • SELECT `meta_value` FROM `prefix_postmeta` WHERE HEX(`meta_value`) RLIKE "^(..)*F."
    

    Will at-least find all the posts with emojis in the content for you.