I have a html file from a website and I work with a regex to search for words and write these words to a document. I have this text:
<div class="scrollable " style="height: 200px;">
<div>
<p>CO-Schrank: nicht benötigtes ausbauen</p>
<p><strong>________________________________________________________________________</strong></p>
<p><strong>==> wird nicht mehr benötigt!<br /></strong>z-B.: IUC</p>
<p>CO-Management in Gen. 2 implementieren</p>
<ol>
<li>Ausbau der PCI-Karten aus ZKA-PC in CO-PC- PC-Sys 02 TP 55, 56, 61 sind noch Profibus im ZKA-PC ==> in CO-PC- PC-Sys 02 greift dann auf CO-PC für Datenaufzeichnung => Betrieb wieder aufnehmen</li>
<li>Ausbau der IUC</li>
<li>Testaufbau am CO-PC für den CO-Algorithmus und Datenspeicherung</li>
<li>Gen. 2 in CO-Management implementieren- pro Prüfling 3 Min. (3 Min. x 48 HG x 10 Messungen) = 1440 Min. = 24 h- Messzeit 1-2 Min.</li>
</ol>
</div></div>
Now I want all the text in the <div>.... </div>
too.
I wrote this code but it is not working:
Match description = Regex.Match(line, "^<div class=\"scrollable \"^(.*?)$div>",
RegexOptions.Multiline);//multiple line
if (description.Success)
{
//Console.WriteLine(status_id.Groups[1].Value);
System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\\Webasto\\csv-"+zahl+".txt");
file.WriteLine(id.Groups[1].Value + ";4;4;" + subject.Groups[1].Value + ";" + due_date.Groups[1].Value+";NULL;"+status_id.Groups[1].Value+";"//+assigned.Groups[1].Value
+";"
+priority.Groups[1].Value+";NULL;"+autor.Groups[1].Value+";0;"+created_on.Groups[1].Value+";"+start_date.Groups[1].Value+";"+done_ratio.Groups[1].Value+";"+hours.Groups[1].Value
+";NULL;"+id.Groups[1].Value+";1;2;0;"+closed.Groups[1].Value+";");
file.Close();
}