Is there a way to achieve the equivalent of a negative lookbehind in javascript regular expressions? I need to match a string that does not start with a specific set of cha
This effectively does it
"jim".match(/[^a-g]m/) > ["im"] "jam".match(/[^a-g]m/) > null
Search and replace example
"jim jam".replace(/([^a-g])m/g, "$1M") > "jiM jam"
Note that the negative look-behind string must be 1 character long for this to work.