I have a database with a lot of old phpBB data that contains posts with text like:
[b:522f1e2c15]bold[/b:522f1e2c15]
[i:522f1e2c15]italic[/i:522f1e2c15]
[u:522f1e2c15]underline[/u:522f1e2c15]
[img:522f1e2c15]http://www.mysite.com/myimage.jpg[/img:522f1e2c15]
[quote:522f1e2c15="Mark"]quoted text by Mark[/quote:522f1e2c15]
We need to migrate this data to a new system, but as part of the process we need to replace the unique id that appears within the various tags, so the above would become:
[b]bold[/b]
[i]italic[/i]
[u]underline[/u]
[img]http://www.mysite.com/myimage.jpg[/img]
[quote=Mark]quoted text by Mark[/quote]
I’m hoping that some SQL RegEx guru can show how to do this?
Just a piece of a possible solution. Use Regex to match groups then exclude the unique id groups.