The regular expression should match below criteria. The number of elements before and after the dot can be any. Only 1 dot is allowed and negative sign is allowed at first position only. I do not require comma.
Example:
1
-1
-1.
1.
1.2
-.2
-0.2
000.300
All above expressions should result true.
So if i break up..
- An optional negative sign at first place.
- Zero or more digit before dot.
- Dot is optional. Can occur max one time. It can be pure integer number also.
- O or more digits after dot.
Any help will be appreciated.