I'm trying to apply a text replace on my WordPress MySQL database. I need to delete part of the current images html code, but this part of the text is variable, althouth there is a part that never changes.
Is there some wildcard that I can use on a MySQL replace?
Example: I would like to replace this:
<a target="_self" href="actualidad/tecnologia/4455-windows-7-surpasses.html"><img src=”http://www.example.com/files/HIDDEN_264_23662_FOTO_win01.jpg" width="215" height="156" /></a>
to
<img src=”http://www.example.com/files/HIDDEN_264_23662_FOTO_win01.jpg" width="215" height="156" />
And delete the href part, so I was thinking in a replace similar to this one:
update wp_posts set post_content = REPLACE
(post_content, '<a target="_self" href=*<img','<img');
Is there a "*" (or regexp) that takes whatever there is between the 'href' and the '