I made a RegExp that functions correctly in my code, but it is only compatible with ES2018 because it uses negative lookbehinds. A library is consuming the RegExp function, so I can't change how the RegExp is used.
I've tried placing a non-capturing groups at the start to find "not" the characters, but it does not work the same when I test it.
/((?<![\^+-])[0-9]+)/g
When running my test suite regexes like /(?:[^^+-])([0-9]+)/g
fail the tests because they include the preceding character.