Re: HELP , HELP ,HELP

From: Date: Wed, 30 Mar 2005 03:36:45 +0000
Subject: Re: HELP , HELP ,HELP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211837@lists.php.net to get a copy of this message
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

« previous php.general (#211837) next »