On 20.06.2008 01:16, Justin To wrote: > /^(100(\.0{1,2})?|(\d{1,2})?(\.\d{1,2})?)$/ > > works Martin, but I made a mistake, I actually want the number at 0.00 > to be just 0 and at 100.00 just 100... what alteration to your regex > would have to be made? Depending on the situation I'd probably just match floating point numbers and check the converted value instead of creating a complex regexp. /^\d{1,3}(?:\.\d{1,2})?$/ Kind regards robert