GoConqr has a new look! Let us know what you think.

Module 24 of 33 · Media

Validate German cellphone number

Kostas Diakogiannis

Validate German cellphone number

FO-5 Validate a German cellphone number

Validate if a cellphone number has the typical German number structure.

The number should start with 0049, if not it should start with 0. After that, an optional space could follow, and then 11 digits from 0 to 9. In between these 11 digits the user has the opportunity to put an optional space wherever he wants.

Accepted data: 

1. 0049 15770452536

2. 015770452536

3. 00491577 0452536

4. 0157 74 525 36

Hint: Check the grouping () characters expression again. Try not to write 11 times the same pattern for every character. What if we are talking about 50 or 500 characters?

 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?