How to do a regular expression replace in MySQL?
问题 I have a table with ~500k rows; varchar(255) UTF8 column filename contains a file name; I'm trying to strip out various strange characters out of the filename - thought I'd use a character class: [^a-zA-Z0-9()_ .\-] Now, is there a function in MySQL that lets you replace through a regular expression ? I'm looking for a similar functionality to REPLACE() function - simplified example follows: SELECT REPLACE('stackowerflow', 'ower', 'over'); Output: "stackoverflow" /* does something like this