Answer the question
In order to leave comments, you need to log in
What should the regular expression look like?
Good afternoon, how to make a regular expression for checking &1234577934 (starts with & and then a number)
I tried this const reg = /^$|\&?\d$/ - does not work ((
Answer the question
In order to leave comments, you need to log in
And you insert your regular into https://regex101.com/ and there it will be written on the side how it works.
You have a lot of weird and unnecessary checks.
Enough&\d+
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question