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().
Fix unusedkeys test not detecting key use in widgets with no js
(Issue #3816) add error notification on register failure
(Issue #3767) add license info to test files
Revert "(Issue #3767) add license info to test files"

This reverts commit 326b97cac98f523b13d4ed8c59a8d779c9323919.
(Issue #3767) add license info to test files
Merge pull request #3817 from sathomas/casperCopyright

Add license info to test files
Merge pull request #3807 from ucamhal/oae/fix-unusedkeys-no-js

Fix unusedkeys test not detecting key use in widgets with no js
Merge pull request #3792 from ucamhal/oae/fix-css-test-regex

Fix regex.match() in doRegexTest() missing start of string
Merge pull request #3816 from sathomas/issue3816

Server error when creating user results in no feedback