Hello, I need to find anything inside a tr...
<tr class="class1">
more tags here,
multiple lines...
</tr>
How can I get anything that's between <tr class="class1">
and </tr>
?
thanks!
Hello, I need to find anything inside a tr...
<tr class="class1">
more tags here,
multiple lines...
</tr>
How can I get anything that's between <tr class="class1">
and </tr>
?
thanks!
You need to use a real HTML parser, regex isn't sufficient to perform this task.
That said, you can use a poor expression like this: /<tr.*?>(.*?)<\/tr>/
where group 1 will have what's (generally) between the <tr>
tags, but no guarantees on correctness...things like nested tags will throw this off. You need to use a real HTML parser.
2 possibilites:
Client side: Jquery - http://docs.jquery.com/How_jQuery_Works
Server side: Linq To Xml - http://msdn.microsoft.com/en-us/library/bb387061.aspx
Examples can be added if needed. I however think that the articles I posted will be quite useful in getting you started.