So I am trying to use regular expressions to detect if someone put a percent value in my discount field. However I am not sure how exactly to make it detect any kind of percent. I want it to be able to calculate percents with any kind of imaginable percent. Like 45% or 45.67% or .45% or 0.000005%. Here is the regular expression I am using currently.
eregi("[0-9]*[:punct:]?[0-9]*%
It does not pick up what I want it too any suggestions?