regex need

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
karthi

regex need

Post by karthi »

I want to match <script> to </script> using regular expression

I am using <script.*</script>

It matches only if there is space after </script> else it matches last </script>.

If anybody knows how to match, please reply.
User avatar
mcm
Posts: 359
Joined: Sat Jun 10, 2006 2:36 am

Post by mcm »

Not sure of the details of what you are wanting it for, but the only thing you need to be careful with is the '/' character. That is used to start and finish the regular expression and if you want it to appear in the middle of the expression it needs to be escapped. Adblock automatically does this so that's why some people haven't bothered doing it in an Adblock Filter. So your expression might look like:

/<script.*<\/script>/
jpp_sd

Post by jpp_sd »

ifya want to block script try the NoScript extension:
https://addons.mozilla.org/extensions/m ... fox&id=722

or GreaseMonkey allowsya to mess with scripting too:
https://addons.mozilla.org/extensions/m ... php?id=748
Guest_

Post by Guest_ »

Try This page It helped me alot, also the little "getting started" section in adblock plus is how I started to learn Reg Ex.
Guest

Post by Guest »

what are you trying to block? wouldn't

Code: Select all

/\.js/
work? the code your working for doesn't work.. :lol:
Locked