baffling str_replace
Posted: Wed Mar 24, 2004 1:02 pm
ok im currently in the midst of developing a BB-style code for my sites, however am stuck on the more complex expressions such as:
[url="www.example.com]example[/url]
to
<a href="\www.example.com>example</a>
and
[image src =www.example.com]
to
<img src=\"www.example.com\">
now im used to doing stuff like
however im unable to do the above mentioned 2 due to teh actual 'customisability' of the tags
would anyone care to enlighten me on this subject?
Thanks in advance
[url="www.example.com]example[/url]
to
<a href="\www.example.com>example</a>
and
[image src =www.example.com]
to
<img src=\"www.example.com\">
now im used to doing stuff like
Code: Select all
$formatted = preg_replace('/\[b\](.+?)\[\/b\]/is', '<b>\1</b>', $text);would anyone care to enlighten me on this subject?
Thanks in advance