CSharp examples for System.Text.RegularExpressions:Match Number
Contains Numbers by regex
using System.Security.Cryptography; using System.IO;/*from ww w. j a v a 2 s.co m*/ using System; public class Main{ private static bool ContainsNumbers(string value) { System.Text.RegularExpressions.Regex regEx = new System.Text.RegularExpressions.Regex(@"[0-9]", System.Text.RegularExpressions.RegexOptions.Singleline); return regEx.IsMatch(value); } }