This uses global variables that are set by doing the regular expression, which isn't threadsafe and generally isn't desirable. It's better to do `if (match = line.match(regexp))` and use `match[1]` instead of `$1`.