On Tue, March 29, 2005 4:49 pm, wangchq said:
>  if(eregi("^\$[0-9]+\,[0-9]+\.[0-9]+",$set,$account)){

For starters:

PHP use \ as an escape character for $ inside of ""
Regex uses \ as an escape character for $ as a literal rather than
line-end character.

So your \$ should be \\\$, because PHP will "eat" the \\ and turn that
into \ and then PHP will "eat" the \$ and turn that into $, and then
you'll be passing \$ to Regex.

As it stands now, your Regular expression is:
^$[0-9+...
which is basically an invalid expression, as it has a bunch of crap
trailing after the new-line ($) symbol.

Disclaimer:  I'm *NOT* good at Regex.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to