in reply to Re: Regex - backreferencing multiple matches in one group.
in thread Regex - backreferencing multiple matches in one group.
use strict; use warnings; my $input = "!Frequency[A][B][C] ..some other text.."; $input =~ s/^!//; # dump that leading '!' print "'$input'\n"; my @pieces = split(/[\]\[]+/, $input); foreach my $piece (@pieces) { print "PIECE '$piece'\n"; }
|
|---|