Naderjlyr
Naderjlyr

Reputation: 175

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?

Upvotes: 0

Views: 691

Answers (1)

Wilhelm Hjelm
Wilhelm Hjelm

Reputation: 26

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.

Upvotes: 1

Related Questions