Re: problem with string.Contains()
- From: "Robert Everett" <rdeverett@xxxxxxxxx>
- Date: Sat, 15 Mar 2008 01:49:41 -0500
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" <chris.vankirk@xxxxxxxxxxxx> wrote in message news:7u7ct3d59gd149dlvi0lfmpnou5dh91a1t@xxxxxxxxxx
On Mon, 10 Mar 2008 15:53:28 +0100, "Jeff" <no_email_address> wrote:
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
.
- References:
- problem with string.Contains()
- From: Jeff
- problem with string.Contains()
- Prev by Date: "Categorized" DataGridView (windows forms
- Next by Date: Cruise Stamped Replica Handbags - Cheapest Fake Cruise Stamped
- Previous by thread: case solved
- Next by thread: Trouble sending mail via SmtpClient while Server requires authentication
- Index(es):
Relevant Pages
|