V
V
val182018-03-31 16:10:44
Regular Expressions
val18, 2018-03-31 16:10:44

How to write a regular expression by condition?

How to write a regular expression by condition? to check a phone number in the format
+XXX-XX-XXXXXXX, where X is any digit

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick Sdk, 2018-03-31
@lidacriss

/^\+\d{3}-\d{2}-\d{7}$/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question