Jump to content

Having problems with regular expressions


brynjar

Recommended Posts

First time using regular expressions, here is a part of the code:

 

elseif (ereg('/tor2/index.php?loc=Images[0-9]', $_SERVER['REQUEST_URI']) || ereg('/tor2/?loc=Images[0-9]', $_SERVER['REQUEST_URI']))

    include('images.html');

 

It's suppose to include image.html if the URI or URL is /tor2/index.php?loc=Images1 or /tor2/index.php?loc=Images2 or any number from 0 to 9 at the end of /tor2/index.php?loc=Images or /tor2/?loc=Images.

 

What am I doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/87609-having-problems-with-regular-expressions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.