Regex case

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
smk
Posts: 100
Joined: Mon Jul 14, 2008 6:54 am

Regex case

Post by smk »

I want to compose the filter that would match the string [a-z]Ad that matches case, however, when i try [a-z] it seems to recognize this as [a-zA-Z], matching the upper case as well, as in BAd. I want it only to match bAd. How can I do this? Thanks
smk
Posts: 100
Joined: Mon Jul 14, 2008 6:54 am

Re:

Post by smk »

I tried another way:
using (?-i:bAD). Adblock plus seems to give me a invalid error :(
Dr. Evil
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Post by Dr. Evil »

I think the filter has to look like this:

Code: Select all

/[a-z]/$match-case
smk
Posts: 100
Joined: Mon Jul 14, 2008 6:54 am

Re:

Post by smk »

can that work only on single chars?
or for ever filter I define
i have to right e.g.
/this_is_an_[aA][dD][vV][eE][rR][tT][iI][sS][mM][eE][nN][tT]/
I need something like:
/this_is_an_/$matchcase/advertisment/
Wladimir Palant

Post by Wladimir Palant »

You cannot have that with regular expressions in JavaScript - match-case is for everything.
Locked