poj#!perl use strict; use Data::Dump 'pp'; my @excerpts = (); my $fc = 'abcdfoofrobnicatebardefforspambazghi'; my $re2 = qr/(fo.)(.*?)(ba.)/; while ($fc =~ /$re2/g){ push @excerpts, { fpart => $1, bpart => $3, content => $1.$2.$3 } ; } pp @excerpts;
In reply to Re^5: Adding hashes to already existing array
by poj
in thread Adding hashes to already existing array
by ExReg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |