Move global regex inside the loop so it gets reset each time.
Merge pull request #973 from AnalyticalGraphicsInc/fixJsHintOnSandcastle

Fix JSHint on Sandcastle examples