A
A
Anton2018-06-07 15:10:20
Regular Expressions
Anton, 2018-06-07 15:10:20

Phone controller. How to fix?

Good afternoon.
Phone number template in a single form
+79001234567
Regular /[+7]([0-9]{10})$/
Works, but it works without the last character, i. 9 digits after +7.
How to fix?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick Sdk, 2018-06-07
@Eridani

you have [+7]
either "plus" or "7" written, the
regular season sees "plus" and then [0-9]{10}- ten digits
, and what confuses you now?
https://regex101.com/r/CrRh0d/1
probably write like this:
https://regex101.com/r/2v9d7L/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question