Page 1 of 1

Escape Dollar Sign

Posted: Mon Mar 06, 2006 4:57 pm
by Toot4fun
This is probably a very stupid question, but I can't seem to find an answer. How do I escape a $ within a string?

Example: "Hello$There"

This is correctly being interpreted as the string "Hello" followed by the variable $There. However, I'd like to escape the $ so that I can see if a user has entered any non-alphanumeric characters into a text box - in this case, the $. How is this done?

Posted: Mon Mar 06, 2006 5:12 pm
by feyd
\$

or 'Hello$There'

Posted: Mon Mar 06, 2006 6:00 pm
by Toot4fun
Ahhhh. I tried the \$, but not the single quotes. Works like a charm.

Thanks a lot!