Since I've installed the HTML BBCode on my board, I would like to get rid of all code between the [html:xxx] and [/html:xxx] brackets for all posts emailed to users.
I don't understand the ereg_replace and preg_replace functions quite well, but by looking at existing code and using a trial and error method, I was able to come up with this:
Code: Select all
$post_text = trim( ereg_replace("[html:([a-zA-Z0-9])](.*?)[/html:([a-zA-Z0-9])]", "", $post_text ) );
Code: Select all
ereg_replace() [function.ereg-replace]: REG_BADRPT in ...
Thank you very much for your help!