use strict; use warnings; use Data::Dumper; my $str = "[x=1 y=3 z=5] {a=1 b=2 c=3} [d=4 e=5 f=6]"; my @ary = map { /(\w+)=(\d+)/g } # capture foo=bar $str =~ /\[([^\]]+)\]/g; # but only between [ and ] print Dumper(\@ary);
In reply to Re: Some more regex
by Roger
in thread Some more regex
by toonski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |