I have a requirement to find and extract a number contained within a string.
For example, from these strings:
string test = \"1 test\" string test1 =
var match=Regex.Match(@"a99b",@"\d+"); if(match.Success) { int val; if(int.TryParse(match.Value,out val)) { //val is set } }