I want to delete all <scripts>
in all html files in all subfolders.
I can't find the correct version of the line
regular expression: <script[\w\W]*?</script>
here's how it looks in the line for my reasons:
find . -type f -name «*.html» -exec sed -i 's/<script[\w\W]*?</script>//g' {} \;
I also tried it on every screening down to:
\<script\[\\w\\W\]\*\?\<\/script\>
this doesn't work
There is another option
find -type f -name \*.html | xargs sed -i '/\<script/,/\<\/script\>/c\ '
but it deletes all the contents of the page from the first script to the last.
All I need to delete only <script ....</script>
Maybe grep can do it?