in reply to regexp matching around a word

push @results, [$1,$2] while $text =~ /((?:\w+\s+){0,5})blue((?:\s+\w+){0,5})/g;