I need to load a long string from the internet and I have done that. Now I need to find the H1
header tag and print the contents.
What is the shortest or the easiest way to do that?
for (int x = 0; x < tempString.Length; x++)
{
if (write == 2)
{
name =name + tempString[x];
lenght++;
}
if (tempString[x] == '<' && tempString[x] == 'h' && tempString[x] == '1' )
write = 1;
if (write == 1 && tempString[x] == '>')
write = 2;
if (tempString[x] == '-' && write == 1)
write = 0;
}
I know it's a bit how shall I say odd. But it's all I have.