Thanks for the suggestion, but I don't think it improves the code:

```
    do {
        urlMatch = urlRegEx.exec(line);
        if (urlMatch && pos.ch >= urlMatch.index && pos.ch <= urlMatch.index + urlMatch[0].length) {
            tokenString = urlMatch[1];
            break;
        }
    } while (urlMatch);
```

There's 1 less call to `urlRegEx.exec(line)`, but there's an extra check for `urlMatch`, so it checks `urlMatch` twice on every loop.

I'm going to leave it like it is.