orsub get_captures { my ($pattern, $line) = @_; my @captures = $line =~ m/$pattern/; shift(@captures) if !$#+; return @captures; }
sub get_captures { my ($pattern, $line) = @_; my @captures = $line =~ m/($pattern)/; shift(@captures); return @captures; }
In reply to Re^5: regex question - dynamically address captures
by ikegami
in thread regex question - dynamically address captures
by nmerriweather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |