my @results = $str =~ m{ (?= (\S+ \s+ \Q$word\E \s+ \S+) ) }xmsg; [download]
In reply to Re^2: Regular Expression rematch by AnomalousMonk in thread Regular Expression rematch by dlw