in reply to Re: Extract substring from string with no whitespace using regexp?
in thread Extract substring from string with no whitespace using regexp?
If you use a regex that has parentheses in list context, the substrings are returned in a list, and can be used directly:
my ($abc, $a, $c) = "abc" =~ /((a)b(c))/
see perlop for more information about m// and s/// and what they return and how flags like //g affect them.
|
|---|