I am trying like heck to understand this regular expression business and I get the simple stuff, but I am having some trouble with this...I have built a very cool forum and implemented some simple UBBCode into it, I am now trying to make a hyperlink thing to code links, something like:
[link=http://...]text to link[/link] to make link, I have been trying and I get this working from various other ubbCode I have working:
$body = preg_replace('/[link=(http:\/\/+.[\s]+)](.*[[]+)[\/link]/is','<a href="\1" target="_blank">\2</a>',$body);
I hope the code isn't too goofed up by the forum, or the fact I had Japanese marked as my default font a few minuites ago and some characters look funny, some slashes are still funny characters...time to reboot I guess...
back on topic though, am I even in the ballpark with this chunk of code?