I’ve tried ^[0-9]$ And ^d$ But they’re allowing +,++
When tried ^[^+]*$ it is still allowing +
2
I’m using .match(/-?d+(.d+)?/gi) maybe help
.match(/-?d+(.d+)?/gi)
This will allow you to have numeric value excluding ‘+’ ^[0-9][^+]+$
Regex 101 link- https://regex101.com/r/ptrSs1/1
Click here to cancel reply.
2
Answers
I’m using
.match(/-?d+(.d+)?/gi)
maybe helpThis will allow you to have numeric value excluding ‘+’
^[0-9][^+]+$
Regex 101 link-
https://regex101.com/r/ptrSs1/1