$ cat file
This is the blue tips of blue teeth of a blue mouse in a blue house
$ grep -Eo 'blue.{0,10}' file
blue tips of b
blue mouse in
blue house
See how we're missing blue teeth... above as the start of that blue was swallowed by the .{0,10} of the previous search.
Alternatively, you could do:
$ pcre2grep -o1 -o2 '(blue)(?=(.{0,10}))' file
blue tips of b
blue teeth of
blue mouse in
blue house
Or:
$ pcre2grep -o -o1 'blue(?=(.{0,10}))' file
blue tips of b
blue teeth of
blue mouse in
blue house
Which shows them all and repeats the b of the second blue.
pcre2grep is the example command that comes with PCRE2, the library that GNU grep uses for its -P option (if enabled at build time which is not the case by default but is often enabled by distributions as perl regexps have become a de-facto standard these days).
-o is a non-standard extension originally introduced by the GNU implementation of grep. pcre2grep (and pcregrep before that) extended it so it can take an optional number argument to print what's matched by the corresponding capture group instead of by the whole regexp with -o alone (and a --om-separator to put between each capture group if given more than one -o<n>).
The trick here is that we're using the (?=...) look-ahead operator, so what's matched by the pattern inside is not part of the overall match, we're just looking ahead to check whether .{0,10} matches (which it always will as that matches even the empty string), but we're still capturing what that .{0,10} matches (using (...)) so are still able to report it without it consuming any input. So after finding the first blue in blue tips... and outputting that blue and the next 10 characters, pcre2grep resumes looking for more blues just after the first blue, not after blue tips of b.
Or you could use the real thing (the p in pcre2grep or grep -P):
$ perl -C -lne 'print $1.$2 while /(blue)(?=(.{0,10}))/g' file
blue tips of b
blue teeth of
blue mouse in
blue house
Or:
$ perl -C -lne 'print $&.$1 while /blue(?=(.{0,10}))/g' file
blue tips of b
blue teeth of
blue mouse in
blue house
Where $& is for the full match (the equivalent of -o), and $1/$2 for each capture group (equivalent of -o1/-o2).