PHP 4 NOT backwardly compatible? Problems with regular expressions!

From: Date: Fri, 17 Nov 2000 00:04:03 +0000
Subject: PHP 4 NOT backwardly compatible? Problems with regular expressions!
Groups: php.windows 
Request: Send a blank email to php-windows+get-3929@lists.php.net to get a copy of this message
Check this out: if( !(ereg("^[[:alpha:]]{1,}$",$RT_First_Name)) || !(ereg("^[[:alpha:]]{1,}$",$RT_Last_Name)) ) $problem="First and Last names must include only letters. Please omit any other characters."; I'm using the regular expressions function ereg to insure that only letters are input by user for first and last name (very desirable). This line used to work (in v 3) and now it fails. (Since my host upgraded to V4, my site is failing due to this). This is crucial because it's part of the registration process. No matter what I put in, $problem gets set to the above error. Is [[:alpha:]] still supported? Does php 4 have a different way of handling this? Pls help. Regular expressions are SO powerful and it would be nice for ppl to know how php differs in practice from the manual. -- Douglas R. Dodd Principal WinCashFree.com, Inc. Email: Doug@WinCashFree.com

« previous php.windows (#3929) next »