with the help of this thread I have tweak a regex for my use. Decimal number regular expression, where digit after decimal is optional
So far I have this /^-?[1-9]$|^,\d+$|^0,\d$|^[1-9]\d*,\d*$
It works for
- -12
- 0
- 1
It does not work for
- -1,
- -1,1
what I want is:
- -1,1
may a kind soul explain what I am missing or doing wrong with this regex pls? Thank you very much! I am tweaking it with : https://regexr.com/6sjkh but it's been 2 hours and I still don't know what I am missing. I don't know if language is important but I am in visual basic.