regex - How to match all alphabet except few? -
i want match [a-z] except letters a,e,i,o,u
using negated set [^aeiou]* match except a,e,i,o,u, how restrict everything [a-z]?
this can done using character class subtraction ([a-z-[aeiou]]) in xml schema, xpath, .net (2.0+), , jgsoft regex flavors, how can in pcre?
you use negative lookahead assertion. it's kind of subtraction.
(?![aeiou])[a-z] ^ ^ | | subtract
Comments
Post a Comment