brynjar Posted January 24, 2008 Share Posted January 24, 2008 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 More sharing options...
brynjar Posted January 24, 2008 Author Share Posted January 24, 2008 Okay I found the solution ereg('[0-9]$', $string) Link to comment https://forums.phpfreaks.com/topic/87609-having-problems-with-regular-expressions/#findComment-448138 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.