in reply to RegExp, grabbing first name
You might be looking for $+. Quoting the docs:
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. For example:
/Version: (.*)|Revision: (.*)/ && ($rev = $+);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RegExp, grabbing first name
by grasshopper!!! (Beadle) on Feb 25, 2016 at 20:55 UTC | |
by Maresia (Beadle) on Feb 25, 2016 at 21:14 UTC | |
by Anonymous Monk on Feb 25, 2016 at 21:12 UTC |