my ($pre, $match, $post) = split /\b(word)\b/, $string, 2;