Issue #1645: Performance improvement by reusing the ScriptFragment RegExp object

Done.