Hello,
How can I use regular expression to search and replace all text in between the '<script language="javascript">' and '</script>' tags?
Here's what I have:
function doReplace(myS) {
var regExp = /(<script)\/?[^>]+(</script>)/gi;
myS = myS.replace(regExp,"");
return myS;
}
where 'myS' would be the text containing the javascript.
I get error with searching for '(<script)' - it thinks it's nested scripts.
Thanks for your help.
How can I use regular expression to search and replace all text in between the '<script language="javascript">' and '</script>' tags?
Here's what I have:
function doReplace(myS) {
var regExp = /(<script)\/?[^>]+(</script>)/gi;
myS = myS.replace(regExp,"");
return myS;
}
where 'myS' would be the text containing the javascript.
I get error with searching for '(<script)' - it thinks it's nested scripts.
Thanks for your help.