skip to Main Content

I’ve tried
^[0-9]$
And
^d
$
But they’re allowing +,++

When tried ^[^+]*$ it is still allowing +

2

Answers


  1. I’m using .match(/-?d+(.d+)?/gi) maybe help

    Login or Signup to reply.
  2. This will allow you to have numeric value excluding ‘+’
    ^[0-9][^+]+$

    Regex 101 link-
    https://regex101.com/r/ptrSs1/1

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search