I have a table for tags. Since some users have done copy-paste from our website the some tags occur with count numbers at the end, like so:
Tag1
Tag1 (5)
Tag2
Tag1 (7)
As far as i know, mysql doesn’t support regex replace, so how can i remove these?
I don’t want to do it with php cause the table is large, and i’d like to run it regulary.
Expected end result:
Tag1
Tag1
Tag2
Tag1
Cheers!
You can achive this by using string functions:
SQLFIDDLE DEMO HERE