php-general | 2001032
Date: 03/31/01
- Next message: PHP User: "[PHP] Executing a PHP file to write an html file"
- Previous message: Rouvas Stathis: "Re: [PHP] PHP SITE REDESIGN - What happened to older source files?"
- Next in thread: Jon Jacob: "Re: [PHP] Quick RegEx Question"
- Reply: Jon Jacob: "Re: [PHP] Quick RegEx Question"
- Reply: Jack Dempsey: "Re: [PHP] Quick RegEx Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I want to check if a variable contains a price, like
$19.99
It definitely would be a dollar sign, two integers a dot and
two integers. Here is what I tried which doesn't work.
if (ereg("\$([0-9]{2}).([0-9]{2})", $Price))
or
if (ereg("\$([0-9]{2})\.([0-9]{2})", $Price))
Thanks.
Jeff Oien
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: PHP User: "[PHP] Executing a PHP file to write an html file"
- Previous message: Rouvas Stathis: "Re: [PHP] PHP SITE REDESIGN - What happened to older source files?"
- Next in thread: Jon Jacob: "Re: [PHP] Quick RegEx Question"
- Reply: Jon Jacob: "Re: [PHP] Quick RegEx Question"
- Reply: Jack Dempsey: "Re: [PHP] Quick RegEx Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

