I am trying to learn regular expressions and have a question for the following codes
Why does this code allow everything
return (preg_match_all ("/[a-z]\'*\-*\s*/", $testString));
Why does this allow nothing
return (preg_match_all ("/^[a-z]\'*\-*\s*$/", $testString));


Reply With Quote




Bookmarks