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

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -