in reply to Re^2: How can I access the number of repititions in a regex?
in thread How can I access the number of repititions in a regex?
while(<>){ for my $pat ( qr/\d/, qr/string/ ){ my $count = () = /$pat/g; print "$pat matched $count times\n"; } }
|
|---|