[PATCH 1/2] jscript: Handle star and opt operators while matching global regex properly.