How to match !x but not !!x in JS regex?
- by mpeterson
Given the following text:
This is!!xa simple string!xpattern
I would like to get a regexp that matches the !x that's between "string" and "pattern" but not !!xa that's between "is" and "a".
This regexp is to be used inside a string split().
I have tried several combinations but I cannot get a regexp that meets my needs. Perhaps my expression is not so regular after all =)
Thanks in advance!