[thelist] PHP- simple reg-ex has me stumped

Howard Cheng howcheng at ix.netcom.com
Wed May 8 11:35:01 CDT 2002

The problem with this regex is that you have a period in there, which
matches any character, so it's actually equivalent to "^.+$". You'll want
to use
"^[a-zA-Z0-9\-\s]+$" instead.

At 04:58 AM 5/8/2002 -0400, Stephane Gosselin wrote:
>This regex: ^[a-zA-Z0-9\s.\-]+$ , wich has to be close to solving my
>problem works good on http://regxlib.com/RETester.aspx?regexp_id=63
>  BUT fails in my php script with the ereg function, also tried preg_match,
>no go. What s the prob?

Howard Cheng
howcheng at ix.netcom.com
AIM: bennyphoebe
ICQ: 47319315

More information about the thelist mailing list