Я не могу понять, какой именно шаблон можно использовать с функцией PHP preg_replace.Вот пример некоторых BBCode на форуме phpBB.
[color=black][font=Times New Roman][color=black]Thanks. As discussed last night/this morning, we were able to Cable and provide some small relief. After enough waste water was evacuated, the camera diagnosis found at 30 foot from clean-out, heavy root penetration and possible damage/separation to the line. We don’t want to throw a cost to fix/repair without a second opinion from xxx. We will have solid cost of repair later today of first thin in the morning. [/color][/font][/color]
Я хотел бы удалить открывающие и закрывающие теги шрифтов, любое их количество, которые могут быть встроены в текст, но оставьтетекст между.В этом случае я хотел бы в итоге:
[color=black][color=black]Thanks. As discussed last night/this morning, we were able to Cable and provide some small relief. After enough waste water was evacuated, the camera diagnosis found at 30 foot from clean-out, heavy root penetration and possible damage/separation to the line. We don’t want to throw a cost to fix/repair without a second opinion from xxx. We will have solid cost of repair later today of first thin in the morning. [/color][/color]
Названия шрифтов могут быть разными, у некоторых в именах есть пробелы, у некоторых - нет.Сопоставление с шаблоном должно работать независимо.
Заранее спасибо!