string a = textbox.text; // hello-1234G string b = string.Join("", input.Where(k => char.IsNumber(k))); // 1234
\d+
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)