As with people who’ve experience regex’s for the first time, you know how difficult it is to comprehend.
I’m checking a form and I want to be sure a string is made ONLY out of lowercase letters (no number, spaces etc…)
if(!preg_match('/[a-z]/',$form['username'])){
$error = "Use lowercase letters only (a-z)";
}
// 'user name' is fine
// '11111' returns the error
// 'user name 3' is fine
I want it to return the error if there are spaces or digits/character out of the alphabet
Oh and I tried: /^[A-z]$/ it returns an error for everything
thanks for you help
mlk