Regex re = new Regex(@"<(?!table|tr|td)\S+", RegexOptions.Singleline|RegexOptions.IgnoreCase);
foreach(Match m in re.Matches(html))
Console.WriteLine(m.Value);
try {
Regex regexObj = new Regex("<(?!table|tr|td)\\S+",
RegexOptions.IgnoreCase);
Match matchResults = regexObj.Match(subjectString);
while (matchResults.Success) {
matchResults = matchResults.NextMatch();
}
} catch (ArgumentException ex) {
// Syntax error in the regular expression
}
Try
Dim RegexObj As New Regex("<(?!table|tr|td)\S+", RegexOptions.IgnoreCase)
Dim MatchResults As Match = RegexObj.Match(SubjectString)
While MatchResults.Success
MatchResults = MatchResults.NextMatch()
End While
Catch ex As ArgumentException
'Syntax error in the regular expression
End Try