Escaping $ in regular expression
I'm using preg_match() and I am trying to search a string for a bunch of characters but the $ is giving me a ton of grief...
I have attempted the following forms of escaping it:
PHP Code:
'/\$/'
'/\\$/'
//and
'/\\\$/'
//I've also attempted this using double quotes with no luck...
So how do you escape a $ character within a regex in php?
Re: Escaping $ in regular expression
The first should work. What happens instead?
Re: Escaping $ in regular expression
When I use \$ it always returns 1 no matter what.