use Regexp::Common; print "$3\n" while 'type="car" of make="Ford" color="red"' =~ /$RE{delimited}{-delim => '"'}{-keep}/g; __END__ car Ford red