Given the following line, how do I get the regex below from picking up the second set of SPAN tags. I want the zip, not the extend zip.
<TD width="20%">Zip Code: <B><SPAN class="TableBody clsBold">06902</SPAN>-<SPAN class="TableBody clsBold"> 2630</SPAN></B></TD></TR>
Regex:
<TD.+>([(\s)A-Za-z#]+:)\s*<B><SPAN class="TableBody.*">([\d\s#a-zA-Z$,]+)</SPAN>
<TD.+>([(\s)A-Za-z#]+:)\s*<B><SPAN class="TableBody.*?">([\d\s#a-zA-Z$,]+)</SPAN>Your regex was close, but the
TableBody.*is greedy, and adding a?after.*makes it lazy so it doesn’t grab the entire next portion of tags.