From 97562c19f8f1f079714b393b1b2afa895e930916 Mon Sep 17 00:00:00 2001 From: Rohanrbharadwaj <89947037+Rohanrbharadwaj@users.noreply.github.com> Date: Sun, 10 Oct 2021 23:30:04 +0530 Subject: [PATCH] Added doctest (#5182) --- strings/indian_phone_validator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/strings/indian_phone_validator.py b/strings/indian_phone_validator.py index d544e9266..7f3fda5db 100644 --- a/strings/indian_phone_validator.py +++ b/strings/indian_phone_validator.py @@ -16,6 +16,8 @@ def indian_phone_validator(phone: str) -> bool: True >>> indian_phone_validator("+91-1234567899") False + >>> indian_phone_validator("+91-9876543218") + True """ pat = re.compile(r"^(\+91[\-\s]?)?[0]?(91)?[789]\d{9}$") match = re.search(pat, phone)