0

I am using the following expression for the mobile phone rule in google workspace. But this expression also includes landline phones. How do I prevent this? Also google workspace does not use this term "^" used at the beginning of the expression.

Mobile: 05xx xxx xx xx Landline: 02xx xxx xx xx

\(?\+?(\d{2})?[ -]?([05]+\d{2})\)?[ -]?(\d{3})[ -]?(\d{4})?[ -]?(\d{2})[ -]?(\d{2})

1 Answers1

0
(^05\d{2})(\s|-)?(\d{3})(\s|-)?(\d{4})
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Manga
  • 62
  • 4
  • 1
    does not cover other uses. 05551234567 ---- 5551234567 ---- 905551234567 ---- +905551234567 ---- (123)5551234567 ---- – Volkan Tipi Dec 29 '22 at 10:07
  • 1
    Please don't post only code as answer, but also provide an explanation what your code does and how it solves the problem of the question. Answers with an explanation are usually more helpful and of better quality, and are more likely to attract upvotes. – Mark Rotteveel Dec 29 '22 at 10:16