Php Regex Replace All Occurrences Javascript Compiler