Reputation: 109
I want to validate column in oracle database of type NUMBER(5,2)
using regex, I have tried but it not work correctly as required manner, this restricted validation needed in regex:
REGEX:
[-+]?\\d{0,3}\\.?\\d{0,2}+
Upvotes: 0
Views: 57
Reputation: 10838
This works as expected for the cases you've provided:
^[-+]?\d{1,3}(\.\d{1,2})?$
If you have problems with it, let me know what cases it fails on (and if possible a worded description of what should be matched)
Upvotes: 2