[thelist] [regexp] I'm lost

Paul Bennett paul at teltest.com
Thu Jul 17 21:16:32 CDT 2003

ok, I want to allow entries containing only numbers (0-9),any case of 
letters (a-zA-Z), '(', ')', '_', '-', and spaces.
Formatting a regular expression to check for this is somewhat confusing. 
I have been through a couple of tutorials, and checked the php.net 
manual pages for eregi() but am not making any progress.
here is what I have -
(for non-php coders - eregi is a non case-sensitive regexp function)
if(eregi('^[a-zA-z0-9]|\\(\\)\\-\\_+$', $value))
            {return true;}
            {return false;}

am I even close? (Results attest otherwise)

	Paul Bennett						
	Internet Developer				
	Teltest Electronic Design		
Email: paul at teltest.com				
Phone: 64 4 237 4557					
Web: http://www.teltest.com		
Wap: http://wap.teltest.com			

More information about the thelist mailing list