Post of the day

Regular Expression and UK Telephone Number Validation in C#

Here’s simple code snippet demonstrating how to validate a UK Telephone number (both Mobile and landline number) using regular expression in C#.   Regular Expression and UK Telephone Number Validation in C#     Regex regValidUKNumber = new Regex(@”^\s*(([+]\s?\d[-\s]?\d|0)?\s?\d([-\s]?\d){9}|[(]\s?\d([-\s]?\d)+\s*[)]([-\s]?\d)+)\s*$”); string[] inputData = new string[] { “0116 1111111” , “07777777777” , “7777777777” , “+44 7777777777” ,…