I
I
ivanDoligov2020-06-18 20:36:25
Regular Expressions
ivanDoligov, 2020-06-18 20:36:25

How to write validation via regular expression?

Tell me, please, who has a regular expression for "you")
For you, this is a common thing, but magic for me)

there is a condition that says:
- the phone number consists of 11 digits (cellular, without spaces, + and any brackets)
- if the first digit 7 or 8, and the second is NOT 9 or 7, then validation passes

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-06-18
@ivanDoligov

/^[78][12345680]\d{9}$/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question