Applying replace() for RegEx: JavaScript Example