> 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))
>
> Than
Jon Jacob wrote:
> Jeff Oien wrote:
>
> > 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
Jeff Oien wrote:
> 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})", $Pr
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
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Jeff Oien") wrote:
> if (preg_match("/[a-Z],[a-Z]/",$text)) {
>
> Can you tell me where I'm failing here. I want to do something
> if the string has commas in between words with no spaces.
> Like:
>
> blah,blah,blah
"Does it have *any insta
if (preg_match("/[a-Z],[a-Z]/",$text)) {
Can you tell me where I'm failing here. I want to do something
if the string has commas in between words with no spaces.
Like:
blah,blah,blah
Jeff Oien
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For add
6 matches
Mail list logo