in reply to Arbitrary number of captures in a regular expression
if (/^foo (?=.*bar$)/g) { @matches = /\Gm (\d+) /g; } [download]