Given a file, for example:
potato: 1234 apple: 5678 potato: 5432 grape: 4567 banana: 5432 sushi: 56789
I\'d like to grep for all lines that
grep -Po 'potato:\s\K.*' file
-P to use Perl regular expression
-P
-o to output only the match
-o
\s to match the space after potato:
\s
potato:
\K to omit the match
\K
.* to match rest of the string(s)
.*