Hi there guys, well im trying to do somekind of tags system. I already done tags like (bold, italic, underlined, strike) now I need to do [url] and [email]
the url tag must work like this
must detect links in a string like http https ftp www and transform them:
Example1:
$string="http://xpto.com";
$newstring="<a href='http://xpto.com' target=_blank>http://xpto.com</a>";
this is one of the parts of it, the other it must do something like:
Example2:
$string="<a href='http://xpto.com' target=_blank>http://xpto.com</a>";
$newstring="«url=http://xpto.com»http://xpto.com«/url»";
Example3:
$string="«url=http://xpto.com»http://xpto.com«/url»";
$newstring="<a href='http://xpto.com' target=_blank>http://xpto.com</a>";
Replace the « for [ and » for ].
The email tag works almoust the same way, I would apreciate anykid of help, tks for reading.
The whole ideia is to make some kind of tags system like the one used here, in Phpbb foruns.
I already have a few lines of code, but im not too good ar regular expressions, can anyone help me?