My input is as follows
input = "hello <script>alert("I am stealing your data");</script>"
I want to remove the complete script tag from the string and the output should look like
output = "hello"
Tried following command but its not removing complete tag.
input.replace(/(<([^>]+)>)/ig, ''));
It gives result us
"hello alert("I am stealing you data");"