Skip to content

Instantly share code, notes, and snippets.

View horobetzs's full-sized avatar

horobetzs

  • Germany
View GitHub Profile
@undone37
undone37 / intl_phone_regex.md
Last active October 28, 2021 11:58
Regex for international phone number in specific format

Regex for international phone number in specific format

This is a regex for the special format of a phone number like this:

+[COUNTRY CODE] ([AREA CODE]) [CONNECTION NUMBER][[-[EXTENSION]]]

\+\d{1,3}\s\(\d{2,}\)\s\d{3,}(-\d{1,4})?$