You need to use the multi-line modifier m
for your regex. In VB.NET this is supplied as an option for a regex expression. But you also need to escape all forward-slashes using a backslash:
<td class=abc><span class=label>XXX<\/span><\/td>\n<td class=def><span class=field>(.*)<\/span><\/td>
Please note, though, that regex is a very poor way to parse HTML - there are HTML parsers in most languages that do a much better job.
And your regex is very detailed and, therefore, brittle; an additional space would cause it to fail.
Note that in Windows newlines are typically created with a carriage-return and newline combination \r\n
.
Here is an example supplying the Multiline
option:
Dim rex As New Regex("\bsomething\b", RegexOptions.MultiLine)
Regex Options :MSDN