How do I remove all script tags in html file using sed?
I try with this but doesn't work, the command below doesn't remove any script tag from test1.html.
$ sed -e 's/<script[.]+<\/script>//g' test1.html > test1_output.html
My goal is from test1.html to test1_output.html
test1.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>My Website</h1>
<div class="row">
some text
</div>
<script type="text/javascript"> utmx( 'url', 'A/B' );</script>
<script src="ga_exp.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
window.exp_version = 'control';
</script>
</body>
</html>
test1_output.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>My Website</h1>
<div class="row">
some text
</div>
</body>
</html>