On Mon, August 21, 2006 2:13 pm, Dave Goodchild wrote: > On 21/08/06, afan@xxxxxxxx <afan@xxxxxxxx> wrote: >> >> hi. >> >> I have to check if the script file belongs to any ov form1.php to >> form6.php files. Need something like: >> preg_match('/form*.php/', $_SERVER['PHP_SELF']) >> wher * kan be any number between 1 and 6. >> >> Thanks for any help. >> >> the pattern is form[1-6]+\.php. Matches form10.php form11.php form12.php ... form16.php form21.php ... Leave out the + sign, which means "1 or more" And I have a religious conviction that you oughta use \\. inside of ' or " though others find it cluttered. YMMV -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php