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    

demo


Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -