Page 1 of 1

2 specific replace difficulties

Posted: Mon Dec 20, 2004 4:18 pm
by giffen
I am trying to remove each instance of :
addTocInfo("<varying string>")

where <varying string> might have any number of characters.

I have found some but not all of them.

In addition,
I would like to remove all scripts from an html page, i.e.
<script>.*</script>

but I would like to do so even if it spans multiple lines

Thanks in advance.

Posted: Mon Dec 20, 2004 8:22 pm
by s_reynisson
Using Regular expression and Replacement format:

Code: Select all

Find what addTocInfo\("<.*?>"\)
Replace with Empty

Code: Select all

Find what <script>.*?</script>
Replace with Empty
I have also used the POSIX format which can be found under Options.
Note that both examples will find your strings on multiple lines.
Hope that helps

Thanks!!

Posted: Tue Dec 21, 2004 5:08 pm
by giffen
It was exactly what I needed.