# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/.*?(<td style="width:50%">((?!<\\/td>).)*?<\\/td>)//gs;t' <<< "<div class=\"criteria\" style=\"padding-left:0;font-style:italic\"> You searched for:
<span title=\"A*\" >Individual: <span><b>A*</b></span></span>
</div>
</td>
</tr>
</table> <table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" style=\"border-collapse: collapse; width: 100%\">
<tr class=\"ListItemColorNew\">
<td style=\"width:50%\">
<div class=\"gvListItemStyle\">
<span class=\"LargeText15\">JAMES BOND A'MONEYPENNY </span> (LIC# 1111111)
<div class=\"GrayTextShade\"><i>Alternate Names: BOND JAMES</i></div>
<div class=\"GrayTextShade\">
GREY TIDE LLC (LIC# 2222)
</div>
</div>
</td>
<td style=\"width: 25%; vertical-align: top\">
<div class=\"gvListItemStyle\">
<div><img alt=\"help\" src=\'/Content/images/BrokerCheck/icon-blueCheck.png\' style=\'vertical-align:top;padding-right:5px\' />Broker</div>
</div>
</td>
<td style=\"width:25%;text-align:right;vertical-align:top\">
<div class=\"gvListItemStyle\">
<a class=\"btn btn-primary\" href=\"/Individual/Summary/5820616\">Details »</a> </div>
</td>
</tr>"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html