Reputation: 3254
I try to make regex for checking value which can contain numbers 0-9
, ()
, +
and -
. I tried this var checkRegex = /^([0-9]+[ ()+-]*)$/gmi;
but it doesnt work https://regex101.com/r/eX6yH9/1. What did I do wrong?
Upvotes: 1
Views: 52
Reputation: 4532
in the link you provided there is a pattern dd-dd-dd-dd dunno if that was a coincidence the other answer is good
\d\d([ ()+-]\d\d)*
Upvotes: 0