I would like an help to create a regular expression in C # that validates number of phones with DDD but without points and dashes, only numbers. It would be in the format XX12345678 and XX 123456789.
I would like an help to create a regular expression in C # that validates number of phones with DDD but without points and dashes, only numbers. It would be in the format XX12345678 and XX 123456789.
Take a look at this link below that has a super explained answer about your question.
Without the real need to do DDD validation, only digits remain:
\d{10,11}
var list = [
'5112345678',
'61123456789',
'1112345678',
'21123456789',
];
for(var i in list){
console.log(list[i], /\d{10,11}/.test(list[i]));
}