Reply to Re: [PHP] HELP , HELP ,HELP

Your name:

Reply:


Posted by Richard Lynch on 03/30/05 06:36

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация