I have a string like this in my column:
<p>[img ret872154ftu] fileaddress [/img ret872154ftu]</p>
<p>[img fd68721cvn] fileaddress [/img fd68721cvn]</p>
<p>[img xdfh654t] fileaddress [/img xdfh654t]</p>
Now i wish to remove unwanted chars inside [img] and [/img]. I have already used this query but does not work:
UPDATE `table` SET `content` = replace(`content`, '[img [^]*]', '[img]');
Any suggestion?
REPLACEdoesn't take a regular expression, and there is not a native mysql function for regex replacing, only comparing.