Fix regex.match() in doRegexTest() missing start of string

doRegexTest() does not reset regex.lastIndex before beginning the
search again with .match() (after using .test() to confirm at least
one match exists). As a result the first match in the file could be
missed by .match().

In practice this doesn't seem to happen as the .test() call runs on
a shorter version of the file without comments, so the .match() call
starts sufficiently early in the file to catch the first match hit by
test().

To be thorough regex.lastIndex should be reset before the first test()
call in case it was non-zero. However, currently the regex object passed to
doRegexTest() is always newly created, so it's always 0 before test().
Merge pull request #3792 from ucamhal/oae/fix-css-test-regex

Fix regex.match() in doRegexTest() missing start of string