I need a regular expression that only excepts numbers divisible by 1.5. I have no idea if this is even possible?
I checked regex library and they have nothing on it. Any one have any ideas?
I need a regular expression that only excepts numbers divisible by 1.5. I have no idea if this is even possible? I checked regex library and they have nothing on it. Any one have any ideas?
| ||||
feedback
|
As others have said, Regex is not the right tool and it's better to use a CustomValidator like the following:
| |||
feedback
|
It is not a good idea to use regular expressions to validate numerical values. Better to write a small validator function just for this purpose. You could validate numeric/non-numeric very easily with this regex: | ||||
feedback
|
Regular expressions are meant for string validation, not numeric validation (other than saying whether something is or is not numeric). You're going to need a custom validator for this. | |||||||
feedback
|