while (/(yourregexhere)/g) { print $1; }