Page 1 of 1

simple regex question

Posted: Mon Oct 04, 2004 9:36 am
by newmember
can i use $ with alternation?
e. g.: "/(zoom|$|age)/"?

Posted: Mon Oct 04, 2004 9:42 am
by feyd
no. $ is a regular expression metacharacter. It needs to be escaped.

Posted: Mon Oct 04, 2004 11:46 am
by newmember
that was my intension....i want to use $ as metacharacter in above regex

Posted: Mon Oct 04, 2004 11:49 am
by feyd
then why not try it instead of asking us?

Posted: Tue Oct 05, 2004 2:34 am
by twigletmac
For regex it also helps if you spell out a bit more what you are trying to match...

Mac