Re: [PHP] Quick RegEx Question

2001-03-31 Thread Jack Dempsey
> 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

Re: [PHP] Quick RegEx Question

2001-03-31 Thread Jon Jacob
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

Re: [PHP] Quick RegEx Question

2001-03-31 Thread Jon Jacob
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

[PHP] Quick RegEx Question

2001-03-31 Thread Jeff Oien
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

Re: [PHP] Quick Regex Question

2001-03-05 Thread CC Zona
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

[PHP] Quick Regex Question

2001-03-05 Thread Jeff Oien
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