in reply to How to capture quantified repeats?
use strict; use warnings; my $ham = "spam\tspam\tspam\t\tyam\tclam"; my @foo; my @jam = ($ham =~ (m/^[^\t]*\t[^\t]*(?:\t([^\t]*)(?{push @foo, $^N})) +{3}\t[^\t]*$/)); print join("\n", '**', @jam, '**', ''); print join("\n", '**', @foo, '**', '');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to capture quantified repeats?
by ikegami (Patriarch) on Sep 23, 2010 at 16:04 UTC |