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 =
string verificationCode ="dmdsnjds5344gfgk65585"; string code = ""; Regex r1 = new Regex("\\d+"); Match m1 = r1.Match(verificationCode); while (m1.Success) { code += m1.Value; m1 = m1.NextMatch(); }