I have a regex that looks like the following:
var myRegex = /%([a-z_]*)%/i
This matches any substring such as %foo% where a string is between two quotes.
What's the best way to modify this regex so that it only matches when the regex matches when % surrounds anything BUT the string foo? So it won't match %foo% but it would match %bar_% %anythingelse%?