Mailinglisten-Archive |
> $VOKALE = xxx("aeiuoAEIOU", $STRING); > $KONSON = xxx("^aeiouAEIOU", $STRING); $VOKALE = preg_split("/[aeiuo]+/ism", $STRING); $KONSON = preg_split("/[^aeiou]+/ism", $STRING); pcre.pattern.syntax.html For example, the character class [aeiou] matches any lower case vowel, while [^aeiou] matches any character that is not a lower case vowel. Note that a circumflex is just a con- venient notation for specifying the characters which are in the class by enumerating those that are not. It is not an assertion: it still consumes a character from the subject string, and fails if the current pointer is at the end of the string. When caseless matching is set, any letters in a class represent both their upper case and lower case versions, so for example, a caseless [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a case- ful version would. kiri
php::bar PHP Wiki - Listenarchive