[ad_1]
text = input.replace(/(KEYWORD)\(([^)]+)\)/, "$1 $2")
You realize your example has a space after the keyword yeah? Maybe this instead:
text = input.replace(/(KEYWORD)\s*\(([^)]+)\)/, "$1 $2")
2
[ad_2]
solved Variable inside a REGEX
[ad_1]
text = input.replace(/(KEYWORD)\(([^)]+)\)/, "$1 $2")
You realize your example has a space after the keyword yeah? Maybe this instead:
text = input.replace(/(KEYWORD)\s*\(([^)]+)\)/, "$1 $2")
2
[ad_2]
solved Variable inside a REGEX