Regex Price in a String -


I found this regede that found the prices like 1.00 or $ 1.00. But it also gives the right for those values ​​which are 3 or more digits like '365'

  / ([\ d,] +. \ D +) + / i < / Code>  

Does anyone modify this regex to have all types of prices which are floating point but 'continuously' such as '365' or '1000' etc. are not included.

1.00 $ 1.00

Search for all single digit numbers with decimal digits needed. Therefore:

  1.xxx 2.xxx ... 9.xxx   

but not

365 or 365.000

  / (\ d.D +) / i    

Comments