Page 1 of 1

RegExp : only [a-z]

Posted: Sun Aug 17, 2008 9:08 pm
by sylvainhugues
Salut,

working under flash, I apply this regexp : /[a-z]/
to this string : "aà8"

and it returns true because of the "a".
I want it to return false, because I want a string with ONLY caracters from a to z.
"à" and "8" are not from a to z.

How to force matching like this ?

merci, Sylvain.

Re: RegExp : only [a-z]

Posted: Mon Aug 18, 2008 2:51 am
by GeertDD

Code: Select all

preg_match('/^[a-z]++$/D', $str);