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
solved Variable inside a REGEX
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
solved Variable inside a REGEX