Slightly modifies regex in jscript.js