I am at a loss as to how to do this. I am printing some information to a richtextbox that will be multiple lines, has words and numbers. I need to search the richtextbox for spe
It seems like regular expressions might be useful here. Otherwise, if you know there will only be one number in the textbox, you could select all the chars that are digits and initialize a new string from the array:
var digitArray = richtextbox1.Text.Where(Char.IsDigit).ToArray();
string userNum = new String(digitArray);
Messagebox.Show("The User's Number is " + userNum);