I am using regex patterns to search this string:
<tr><td>111</td><td>111@test.com</td></tr><tr><td>222</td><td>222@test.com</td></tr></table>
But always get matcher result as false, any suggestions why?
I want to substring value between <tr> and </tr>.
Pattern myPattern = Pattern.compile('\\<tr>(.*?)\\</tr>');
Matcher m = myPattern.matcher(temp);
while(m.find())
{
.. do things
}
And also this one still not working <tr>(.*?)</tr>
. I check with http://regexr.com/, but it seem ok. However, when I run the code, not working.
Original Post: https://stackoverflow.com/questions/23924814/substring-with-regex-for-between-tr-tag/23924891#23924891
Best Answer
I have executed the following code:
and I got back: