c:\@Work\Perl\monks>perl use 5.010; # needs perl version 5.10+ for \K operator use strict; use warnings; my $string = '... data-src-hq="qwe" ... ' . '... data-src-hq="asd" ... ' . '... data-src-hq="zxc" ...'; my @matches = $string =~ m{ data-src-hq=" \K [^"]+ (?= ") }xmsg; print map "'$_' ", @matches; __END__ 'qwe' 'asd' 'zxc'