Page 1 of 1

Block DIVs named from random numbers YAY!

Posted: Thu Sep 08, 2005 11:10 pm
by jpp_sd
I hate sneaky ads & banner content contained in DIVs named from random numbers.

Humans won't likely name DIVs all cryptic-like.

This simple bit o regex I rigged works like a charm.

Code: Select all

/#DIV.*[0-9]/
l8r

Posted: Mon Oct 03, 2005 1:47 am
by Guest
I approve of this

Posted: Mon Oct 10, 2005 3:35 am
by Guest
There various ways you can write it.

Code: Select all

/#DIV\([1-9]\)/

Code: Select all

/#DIV\(\d\)/

Code: Select all

/#DIV[w_(](\d)/
ect ect.

cool

Posted: Fri Oct 21, 2005 5:36 am
by pro seph any
^ would you kindly explain how each of the above three handles the task differently in non regexesquese?

Update: Block DIVs named from random numbers YAY!

Posted: Mon Dec 19, 2005 10:44 pm
by jpp_sd
oh yeah, forgot to mention that you need somethin like this to block a DIV with 9 or more digits in the name:

Code: Select all

/#DIV.*[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
somethin such as this a nicer lookin way to block a DIV with 9+ digits in the name:

Code: Select all

/#DIV[w9_(](\d)/
seeya!

http://crazynuts.hollosite.com