- or download this
my @results = $str =~ m{ (?= (\S+ \s+ \Q$word\E \s+ \S+) ) }xmsg;
- or download this
my @results = $str =~ m{ (?= (\S \s+ \Q$word\E \s+ \S+) ) }xmsg;
- or download this
my @results = $str =~ m{ (?<! \S ) (?= (\S+ \s+ \Q$word\E \s+ \S+) ) }
+xmsg;