Contains is case sensitive. You will have to try something like:
string myString = "<Table><TR><TD></TD></TR></Table>";
if (myString.ToUpper().Contains("</TABLE>"))
{
Console.WriteLine("Found it.");
}
or you could use regular expressions.
"Christopher Van Kirk" <ch***********@fdcjapan.comwrote in message
news:7u********************************@4ax.com...
On Mon, 10 Mar 2008 15:53:28 +0100, "Jeff" <no_email_addresswrote:
>>Hey
.NET 3.5
I'm trying to search a string to determine if the string contains
</table>,
but string.Contains don't find it. I've used WebRequest/WebReponse to
retrieve the html from a webpage and now I'm searching through this
html...
this webpage contains 4 html tables. so there are 4 </table>, but my code
don't find any...
Here is part of my code, this if-statment don't get true...
string line;
if (line.Contains(" </table>" ))
{
boolean = false;
}
any suggestions?
Check that you haven't put \t instead of /t.
--
Posted via a free Usenet account from http://www.teranews.com