
May 16th, 2000, 11:43 AM
|
|
Junior Member
|
|
Join Date: May 2000
Posts: 6
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I am building a comment script, and want to parse special codes:
[a]http://url[/a] and
[a url="http://url"]description[/a]
well, i gots it working, but when this code is used in a post multiple times, it goes all goofy. like <a href="url">[/a]
the regular expressions I use are:
$comments = eregi_replace("[a url="(.*)"](.*)[/a]", "<a href="1">2</a>", $comments);
$comments = eregi_replace("[a](.*)[/a]", "<a href="1">1</a>", $comments);
Any ideas how to fix this?
Thanks.
[This message has been edited by Fquist (edited May 17, 2000).]
[This message has been edited by Fquist (edited May 17, 2000).]
|