T
T
TechNOIR2017-09-24 14:58:29
Notepad++
TechNOIR, 2017-09-24 14:58:29

notepad. How to bulk remove ad blocks from several html files? Regular expression?

Good day comrades!
There is a local copy of the site. In each html file there is an advertisement, everywhere the same type, only the sizes change.
View blocks set:

<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 728x90+ -->
<ins class="adsbygoogle img-responsive"
data-language="ru"
     style="display:inline-block;height:90px"
     data-ad-client="ca-pub-2010097728032643"
     data-ad-slot="2093871614"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Somehow in Notepad ++ you can delete this piece in bulk with a regular expression for example?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-09-24
@TechNOIR

Try this regex:

<script[^>]+pagead2.googlesyndication[\S\s]+\(adsbygoogle[^\r\n]+[\r\n]+</script>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question