bugs in Match.js re resetting Regex