#!/usr/bin/perl # http://perlmonks.org/?node_id=1164776 use strict; use warnings; print "$1\n" while 'asdfgfhjkl' =~ /(?=(f.*j))/g