0

I need every instance of <tag%/tag> inside of a column to be replaced with nothing ('' or deleted). The content inside of the tag varies. How do I do this while keeping the text that surrounds it?

For example: CONTENT <tag>various stuff</tag> CONTENT. I want to keep all content but remove the tags and everything inside of them, resulting in CONTENT CONTENT.

Edit: What? This has nothing to do with special characters.

I've worked around my problem by just exporting the table, opening it in a text editor, search+replacing and importing. I'm still unaware of any way to do this in SQL.

  • possible duplicate of [how to escape special character in mysql](http://stackoverflow.com/questions/881194/how-to-escape-special-character-in-mysql) – Syakur Rahman Sep 09 '15 at 23:01

1 Answers1

0

Unfortunately this isn't possible. See this question and answer for a link to a possible solution (installing a UDF.)

Community
  • 1
  • 1
miken32
  • 42,008
  • 16
  • 111
  • 154