Tool C# Regular Expression

Документация:
Код через regex.Matches
Спойлер
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;
}
-
2
![Gamehacklab[RU]](https://old.gamehacklab.ru/uploads/monthly_2022_06/1_PNG_GHL_64x.png.6d61ef42c3de6821543db4c0243672ae.png)
3 Комментария
Рекомендуемые комментарии
Пожалуйста, войдите, чтобы комментировать
Вы сможете оставить комментарий после входа в
Войти