So's i had a go at it, somewhat shakily and naively.
As was expected, i hit a snare: when searching for a [url=http...] i could easily turn this into a real url using
Code: Select all
preg_replace('#\[url=(.*)\](.*)\[/url\]#', "<a href='$1'>$2</a>", $_string);
Code: Select all
preg_replace('#\[url=(.*) target=(.*)\](.*)\[/url\]#', "<a target='$2' href='$1'>$3</a>", $_string);
So, my question is: how can i have extra(s*) in the url that dont have to be there?
And how would i go about adding others such as: title, name, id... etc.
Kind regards!
p.s. im terrible of thinking up thread titles!