> -----Original Message-----
> From: çæä [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 30, 2005 11:46 AM
> To: [email protected]
> Cc: [email protected]
Why to AND cc?
> Would somebone give me a example of regulation expression to check
> account(or money) type which start with â$â.
> For example, â$65,786.00â
Same question was asked yesterday?
$str = "$65,786.00";
if(ereg("^([\$]([0-9]+,)?[0-9]+\.[0-9]+)",$str, $pricetag))
print "we found a price tag: $pricetag[1]";
else
print "no prices found";
This is untested, the ([0-9]+,)? Means that there _may_ be digits and then a
komma, but itÂs not necessary, threfore $786.00 and $1.00 matches too. The ()
around all expressions means, that we save whatever is matched into $pricetag
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/systemdeveloper