Will this Java regex return a single result or multiple
Posted
by Blankman
on Stack Overflow
See other posts from Stack Overflow
or by Blankman
Published on 2010-04-18T01:16:22Z
Indexed on
2010/04/18
1:23 UTC
Read the original article
Hit count: 353
If my HTML is:
<tr><td>....</td><hr></tr>
<tr><td>....</td><hr></tr>
<tr><td>....</td><hr></tr>
<tr><td>....</td><hr></tr>
<tr><td>....</td><hr></tr>
<tr><td>....</td><hr></tr>
If my regex is:
Patterp p = Pattern.compile("<tr>(.*)<hr></tr>");
Should this get 1 result or all the individual rows?
Is there a way to force it to get all the rows and not just the entire html from the top <tr>
to the last instance of <hr></tr>
?
© Stack Overflow or respective owner