Tuesday, 18 April 2017

How to match against differences of character groups in JavaScript? [duplicate]

This question already has an answer here:

The regular expression /^[a-z]*$/ is a quick way to match against all characters in the range.

But how can I remove a group of characters from that range?

For instance, what regular expression matches against a-z with e,o,u excluded?

Of course, I can manually put the multiple ranges but I wonder whether there is any better way?



via Dmitri Zaitsev

No comments:

Post a Comment