Page 1 of 1

Pattern Syntax Question?

Posted: Thu Sep 25, 2008 8:38 am
by Mds
Hi.
What's the meaning of - character in PHP's Pattern Syntax ? Image

Thanks in advance.

Re: Pattern Syntax Question?

Posted: Thu Sep 25, 2008 11:02 am
by Christopher
Not sure what PHP's pattern matching. PHP uses regular expressions. '-' is for a range of characters, so /[a-z]/ matches any lower case character.

Re: Pattern Syntax Question?

Posted: Thu Sep 25, 2008 4:53 pm
by Mds
Thank you Image

Re: Pattern Syntax Question?

Posted: Fri Sep 26, 2008 8:48 am
by The_Anomaly
If you're doing extensive work with regex, you might want to check out this reference. It's a nice compilation of the patterns and symbols used.