That does not work when the string doesn't contain any colon:
my $src_string = 'aaa'; my @results = $src_string =~ /([^:]*):/g; use Data::Dumper; print Dumper \@results; __END__ $VAR1 = [];
--
David Serrano
In reply to Re^2: Matching and making accesible an arbitrary number of subpatterns w/a regex?
by Hue-Bond
in thread Matching and making accesible an arbitrary number of subpatterns w/a regex?
by rojam74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |