Tool C# Regular Expression
-
string allText = richTextBox1.Text; string pattern = textBox2.Text; string s = string.Empty; try { Regex regex = new Regex(pattern); MatchCollection matches = regex.Matches(allText); if (matches.Count > 0) { foreach (Match match in matches) s += match.Value + ";\r\n"; } else { s = "Совпадений не найдено"; } textBox3.Text = s; } catch (Exception) { //throw; }