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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -