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

Fix JSHint on Sandcastle examples
fix whitespace
Merge branch 'master' into undojoSandcastle