Page 1 of 1

Regex case

Posted: Fri Aug 08, 2008 4:48 pm
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

Re:

Posted: Sun Aug 10, 2008 4:55 am
by smk
I tried another way:
using (?-i:bAD). Adblock plus seems to give me a invalid error :(

Posted: Tue Aug 12, 2008 8:55 pm
by Dr. Evil
I think the filter has to look like this:

Code: Select all

/[a-z]/$match-case

Re:

Posted: Wed Aug 13, 2008 4:51 am
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/

Posted: Sat Aug 16, 2008 12:30 pm
by Wladimir Palant
You cannot have that with regular expressions in JavaScript - match-case is for everything.