Regex match reverse group in javascript

Viewed 7671

I want to match strings that don't have abc, def or ghi. The opposite is easy:

/(abc|def|ghi)/

How do I reverse that? I don't want to

/(^abc|^def|^ghi)/

because there's going to be more 'logic' in there. (If that's even what it does.)

How do I reverse the whole group match (or whatever it's called)?

(I'm trying to beat 5. on http://regex.alf.nu/)

4 Answers
Related