#2 Using ereg instead of preg

closed
None
6
2001-08-19
2001-08-02
No

By using "ereg" instead of "preg" functions you can
support PHP 3.0.7. In fact "preg_" functions aren't
supported until PHP 3.0.9 so the requirements need to
be updated.

Discussion

  • Robin Johnson

    Robin Johnson - 2001-08-11

    Logged In: YES
    user_id=30201

    there is only one place a preg call is still in the code,
    and it's
    lib.inc.php3:1637 $sql = preg_replace("/\W$data[1]\./i"," ".$data[0].".",$sql);

    what is the ereg call to replace this?

     
  • Robin Johnson

    Robin Johnson - 2001-08-11
    • priority: 5 --> 6
    • assigned_to: nobody --> robbat2
     
  • Robin Johnson

    Robin Johnson - 2001-08-19
    • status: open --> closed
     
  • Brad Andersen

    Brad Andersen - 2001-08-21

    Logged In: YES
    user_id=229831

    let's try:

    eregi_replace("[^a-zA-Z_]$data[1]\."," ".$data[0].".",$sql);

     
  • Robin Johnson

    Robin Johnson - 2001-08-21

    Logged In: YES
    user_id=30201

    actually a friend of mine came up with a better fix for it, since my original preg query actualled added an obscrure
    bug to the code.

    thanks anyway.

    it all works now.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks