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

Code is currently doing the equivalent of this:

```
> var regex = /\w+/g;
undefined
> var text = "once upon a time";
undefined
> regex.test(text)
true
> regex.exec(text)
["upon"]
> regex.exec(text)
["a"]
> regex.exec(text)
["time"]
> regex.exec(text)
null
```

See commit msg for more details.