I’m trying to write a Regular Expression validator. It should accept numbers only with decimal part 0 or 5 only.
like,
Valid Numbers
0.5
1 (1.0)
1.5
2 (2.0)
2.5
. . . etc.
Invalid Numbers
0.1
1.2
1.3
2.4
2.6
please help me… Thanks.
Try this:
The (…)? means that the decimal part is optional.