Got some progress. :up:
(I am running this on a test database to get the syntax right)
Cleaner ran but I got the error:
Warning: preg_replace(): Compilation failed: unmatched parentheses at offset 48
I looked at the test thread and it deleted the string I want to replace but it did not replace it ( due to the error )
So if I can get the code correct it should work.
--------------- Added [DATE]1309380139[/DATE] at [TIME]1309380139[/TIME] ---------------
Success!
Here is the regex pattern that worked:
Code:
$text = preg_replace('|\[ame="http://www.youtube.com/watch\?v=([a-z0-9]+)"\](.+)|i', '[video=youtube;$1]http://www.youtube.com/watch?v=$1[/video]', $text);