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 is how I achieved str.split(/(? for Node.js 8 (which doesn't support lookbehind):
str.split(/(? for Node.js 8 (which doesn't support lookbehind):
str.split('').reverse().join('').split(/@(?!$)/).map(s => s.split('').reverse().join('')).reverse()
Works? Yes (unicode untested). Unpleasant? Yes.