in reply to pattern matching

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

Perl is Huffman encoded by design.