Instead of $& etc., use /^(.*?)(PATTERN)(.*)$/
Then $1, $2, $3 instead of $`, $&, $'
Just as slow as $& etc., but doesn't affect other regexes
Why (.*?) here?