in reply to Arbitrary number of captures in a regular expression
First match the surrounding strings, ending the match just before the "body". Then start just after that header and pull out all the digits.
if (/^foo (?=.*bar$)/g) { @matches = /\Gm (\d+) /g; }
|
---|
In Section
Seekers of Perl Wisdom