Thank you both Jason and Curt...
Looks like I was pretty close...
In fact, I found a fault in my logic, too, that meant only some but not all
instances of $element were being validated, even after i got the preg
function right! But it's all working great now.
- john
> >
> > As John has previousl
I am a semi-newbie at php and a complete newbie to regex
What am I doing wrong here?
function isWord($element) {
return !preg_match ("/[^A-Za-z\-\(\)\s]/", $element);
}
I want to test the string $element and make sure that it contains nothing
but:
- characters A-Z
- characters a-z
2 matches
Mail list logo