1. Not even a script
$ perl -nle '/regex with (capture)/ && print $1'