in reply to Re: where is /\d+$/ result??
in thread where is /\d+$/ result??
See: Mastering Regular Expressions, 2nd ed., ISBN: 0-596-00289-0, Friedl, pp300-301.
"$+ This is a copy of the highest numbered $1, $2, etc. explicitly set during the match."
The "this" (perlvar) you cite phrases it this way:
"$+
The text matched by the last bracket of the last successful search pattern. This is useful if you don't know which one of a set of alternative patterns matched."
Whereas perldoc perlretut states this re @+ and @-:
In addition to what was matched, Perl 5.6.0 also provides the positions of what was matched with the "@-" and "@+" arrays.
|
|---|