#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    6
    Rep 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).]
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    6
    Rep Power
    0
    Anyone? =P

Similar Threads

  1. regular expressions
    By tdennist in forum C Programming
    Replies: 2
    Last Post: January 18th, 2004, 06:01 AM
  2. regular expressions in Javascript
    By DazAdams in forum JavaScript Development
    Replies: 9
    Last Post: November 24th, 2003, 09:09 AM
  3. Getting parts outof text with regular expressions
    By GGK in forum PHP Development
    Replies: 8
    Last Post: August 31st, 2003, 07:31 AM
  4. regular expressions in java
    By anulok in forum Java Help
    Replies: 2
    Last Post: March 5th, 2003, 09:53 AM
  5. Recursive patterns in regular expressions
    By JMM in forum Perl Programming
    Replies: 0
    Last Post: December 15th, 2001, 06:08 PM

IMN logo majestic logo threadwatch logo seochat tools logo