I'm trying to use the following code to read in a file on my web server and display part of its contents (sorry for wrapping):

...
StreamReader streamReaderFile = new StreamReader("/path/to/file.html");
string stringFile = streamReaderFile.ReadToEnd();
stringFile = Regex.Replace(stringFile,
     @".*<!-+\s*-+\s*START\s*HERE\s*-+\s*-->",
     "<br>", RegexOptions.Singleline);
...

But the web server seems to be timing out on the third line, where the Regex is executed. It doesn't time out if I don't use the Singleline option, but then of course it doesn't do what I need it to do. It's supposed to be just getting rid of everything in the HTML file up to and including a comment I placed there:
"<!-- ------------ START HERE ------------ -->"

Any ideas what I'm doing wrong?


Regards,
David P. Donahue
[EMAIL PROTECTED]
http://www.cyber0ne.com
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to