Community Patterns

Community Library Entry

2

Regular Expression
Created·2023-02-07 07:33
Flavor·.NET 7.0 (C#)

@"
^(?<code>\+?\d{1,3})[-\s]{0,}(?<number>\(?\d{3}\)?[-\s]{0,}\d{3}[-\s]{0,}\d{2}[-\s]{0,}\d{2})$
"
gm
Open regex in editor

Description

Phone number for all countries. Valid symbols: ( ), -, whitespace

Submitted by Alexander Smirnov