using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?:\$[\d+,]{,100})";
string input = @"Ваша ассоциация наняла рабочего Стэнфорд Флеминг за $208,000,000. Основным соперником была ассоциация Путь со ставкой $195,440,000.
Следующие игроки приняли участие в аукционе:
DikoBrazzers: $28,450,000
рус73: $27,880,000
TANK1515: $20,110,000
Крысолов: $20,000,000
Валентинович 55: $19,860,000
Slepoy 16ru: $15,000,000
Виктор 74: $13,680,000
корефанец: $10,850,000
Папа Djo: $10,210,000
Кадима: $10,020,000
Aleks Mechanic: $9,410,000
пожик47: $9,300,000
super_skif: $7,590,000
Лoки: $5,640,000";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx