I am trying to grep the word that comes after the match "name:"
Her name: Ana Frost. I know we are meant to be.
Her name: Beth Cooper. I know we are meant to be.
I want my output to be:
Ana
Beth
I tried using the command below but it didn't work:
grep -i '(?<=name:\s)\w+'
Is there a way to do this without the positive lookbehind or make the Unix shell somehow recognize it? Thanks.