Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Why doesnt regex match script tag?

$
0
0
Hello

I am trying to remove script from html file.

Sofar I've managed to come up with this:

[ autoit ]    ( Popup )
StringRegExpReplace($data,"(<script.*?>.*?</script>)","")
I also tried:
[ autoit ]    ( Popup )
StringRegExpReplace($data,"(<script(\s|.*?)>(\s|\n|.*?)</script>)","")


but it doesnt really remove script tag. That tag contains multi line script.

Does anyone know know what how to write right regex pattern for this job?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>