Greetings All!
Say, I have the following statement that's suppossed to do a match on a price:
preg_match("/\d+.\d{2}/", $price_found[1],$parsed_price);
However, if the string that we're reading has a comma in it (example: $1,455.37), the preg_match reads only the stuff after the comma ($455.37).
I get totally confused by regular expression matching. Every time I think I grasp it, I encounter something that throws me off. How can I adjust the above line so that, if the string DOES have a comma (and realize that it may not), it pulls out the entire price (ignoring the comma itself)?
Thanks !!!
-= Dave =-