I would like to use pcregrep with its --color option to highlight text that follows a particular pattern:
e.g. if file.txt contains:
bob says hi
chloe says hello
then running:
pcregrep --color '(?:says)(.*)' file.txt
prints
bob says hi
chloe says hello
but what I want is:
bob says hi
chloe says hello
Is there a way to use pcregrep and have it only highlight text that follows a particular regular expression?