C# Regex to validate phone number

前端 未结 2 2084
感动是毒
感动是毒 2021-01-01 18:26

It would be great if someone could help me with a Regex for phone numbers. Following are the conditions:

  • If + is present, then it should be the first character
2条回答
  •  感情败类
    2021-01-01 18:54

    Not exactly the answer to your question, but for those who need to work with phone numbers, there is a .NET port of Google's libphonenumber: libphonenumber-csharp.

提交回复
热议问题