i have auto generated HTML source text file look like this:
<!--
<script language=JavaScript>
var staMgrParaInf = new Array(1,0,0,0,10,48,2,1,0,0,0 );
</script><script language=JavaScript>var staEntryInf = new Array("192.168.1.56",0,87357,111282,10432836,103871290,1,1,41,52,"192.168.1.21",0,394,42991358,55037052,5,7,260,10360);</script>
</HEAD>
<SCRIPT language="javascript">
var pageRefreshTime = 10;
i want to extract only this text
"192.168.1.56",0,87357,111282,10432836,103871290,1,1,41,52,
"192.168.1.21",0,39439,42063,2991358,55037052,5,7,260,10360
Please help me
i try this code
private void button1_Click(object sender, EventArgs e)
{
String line;
String filetext = null;
int count = 0;
using (System.IO.StreamReader reader = new System.IO.StreamReader("C:\\viewsource.txt"))
{
while ((line = reader.ReadLine()) != null)
{
if (count == 0)
{
if (line.StartsWith("<"))
{
}
else
{
filetext = filetext + line;
}
}
else
{
if (line.StartsWith("<"))
{
}
else
{
filetext = filetext + "\n" + line;
}
}
count++;
}
Trace.WriteLine(filetext);
int start = filetext.IndexOf("(") + 1;
int end = filetext.IndexOf(")", start);
string result = filetext.Substring(start, end - start);
textBox1.Text = result;
reader.Close();
}
}
My result only this
1,0,0,0,10,48,2,1,0,0,0
i want to extract only this text
"192.168.1.56",0,87357,111282,10432836,103871290,1,1,41,52,
"192.168.1.21",0,39439,42063,2991358,55037052,5,7,260,10360