Algo assim parece bom para o seu alvo:
$ cat d2.txt
<h3>Agent</h3>
<p>Blah blah blah </p>
<p>Their agent is XYZ Corp.</p>
$ grep -i 'agent' d2.txt #-i = ignore case. By default grep returns lines containing agent followed by anything or even alone
<h3>Agent</h3>
<p>Their agent is XYZ Corp.</p>
$ grep -iE 'agent.*XYZ' d2.txt #match agent followed by XYZ
<p>Their agent is XYZ Corp.</p>