Normally, I would run the following to replace text within a table in my MySQL database:
UPDATE post SET pagetext = REPLACE(pagetext, '[TEXT1]', '[TEXT2]')
But how do you replace text that is followed by an alphanumeric set of characters?
This is what I'm trying to replace:
[TEXT:12345678] will be replaced with [TEXT]
[/TEXT:12345678] will be replaced with [/TEXT]
How do I run the above query with some wildcard variables so anything with
[TEXT:********]
will be replaced with
[TEXT]
Forgive my ignorance, but I would like to run this through phpmyadmin - but how do I rewrite the REPLACE portion to accommodate the variables following the text? Thanks in advance.