Use the lazy quantifier *? instead of greedy quantifier *
"Officials:.*?/td>"
This will stop at the first occurrence of /td> rather than the last.
Brian Davis
http://www.knowdotnet.com
"Oren Liebermann" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm parsing through the HTML for an nba box score looking to pull out
> the officials' names, but the regex expression I'm using is pulling
> out the officials and all the code after the officials, which I don't
> need.
>
> So here's my regex:
> "Officials:.*/td>"
>
> and here's the HTML I'm getting back:
> "Officials:#24 Mike Callahan, #9 Derrick Stafford,
> #54 Derrick Collins</td><td
> align=\"right\">Attendance: 14796</td></tr></table><!-- End Game
> Info table --><!-- START Visitor player Stats team table --><table
> width.......
>
> This goes on for pages and pages.
>
> I only want from "Officials" to the first "/td>" and I'm pretty sure
> it's the * in my regex that's messing it up, but I'm not sure how to
> fix it. Any help would be greatly appreciated!!