Skip to content

Instantly share code, notes, and snippets.

@shouhei
Last active December 27, 2015 12:51
Show Gist options
  • Select an option

  • Save shouhei/0a6af16412eff47774d0 to your computer and use it in GitHub Desktop.

Select an option

Save shouhei/0a6af16412eff47774d0 to your computer and use it in GitHub Desktop.
import re
def is_telephone(tel):
return re.search("^\d{10,11}\Z", tel)
from unittest import TestCase
import Telephone
class TelephoneTestCase(TestCase):
def test_is_telephone(self):
self.assertIsNotNone(Telephone.is_telephone("08012725966"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment