Jump to content
Larry Ullman's Book Forums

Chapter 14, Page 443, Character Class: [^aeiou]


Recommended Posts

In your book, you said that  [^aeiou] will match any non-vowel because the caret is a negation operator when used as the first character in the class. However, in the PHP manual (http://php.net/manual/en/regexp.reference.character-classes.php) , it says that [^aeiou] matches any character that is not a lower case vowel.

 

This makes me confused, as I think that  [a-z] will match any single lowercase letter and [A-Z] is any uppercase, or  [A-Za-z] is any letter in general.

 

Thanks for your feedback.

Eric

Link to comment
Share on other sites

 Share

×
×
  • Create New...