^(\.[0-9]{1})$|^([0-1][0-9]?(\.[0-9]{1})?)$|^(24(\.0)?)$|^(2[0-3](\.[0-9]{1})?)$
i have this regular expression to validate user inputs in a textbox (any numbers from 0 to 24 with one decimal) but it doesn't seem to allow anything.
i can break it down so it's easier to understand.
^(\.[0-9]{1})$ <-- matches .0 to .9
| <-- or
^([0-1][0-9]?(\.[0-9]{1})?)$ <-- matches 0 - 19.9
|
^(24(\.0)?)$ <-- 24 or 24.0
|
^(2[0-3](\.[0-9]{1})?)$ <-- 23 - 23.9
i also tried to take out the ^ and $ but that allows any input...