I am trying to remove some garbage js code on 4k+ webpages. The webpages have other js on the page as well so I need to only get rid of the JS with a particular function called clickIE.
I have this one liner working until I introduce the regex…
perl -p -i -e 's|<script(.*)>.*clickie.*?<\/script>|<\!--REMOVED-JS-CODE-->|gixsm' ./*.html
My regex works correctly when tested at http://www.gskinner.com/RegExr/ but fails on the command line…(fails meaning… the regex doesnt match anything)
For the regex to work, the entire file needs to be slurped in at once.