How about a "one liner":
use strict; print join ("\n", /req=(\d+)/g) . "\n" while <DATA>; __DATA__ req=44...something...req=56...req=24 req=23 diddle diddle diddle req=1 req=2
44 56 24 23 1 2
In reply to Re: pattern matching
by GrandFather
in thread pattern matching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |