use strict;
my $str = 'Ваша ассоциация наняла рабочего Стэнфорд Флеминг за $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';
my $regex = qr/(?:\$[\d+,]{,100})/mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
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 Perl, please visit: http://perldoc.perl.org/perlre.html