Now I have a regular expression:
string pattern = @"[\s\S]*?(?<content>\<div
id='news'\>\<div[\s\S]*?\<\/div\>[\s\S]*?\<\/div\>)[\s\S]*";
I want to use this pattern to match a html file's content,and replace the
file's content with ${news}.
But if the content is not match the pattern ,the program will lose response.
Why ? and what shall I do?

Re: Regular expression induced the program can't respond by gaidar

gaidar
Mon Jun 06 05:44:16 CDT 2005


Please, post the program code here.

Gaidar

"ch2x" <ch2x@163.com> wrote in message
news:%23HqEjrlaFHA.3144@TK2MSFTNGP14.phx.gbl...
> Now I have a regular expression:
> string pattern = @"[\s\S]*?(?<content>\<div
> id='news'\>\<div[\s\S]*?\<\/div\>[\s\S]*?\<\/div\>)[\s\S]*";
> I want to use this pattern to match a html file's content,and replace the
> file's content with ${news}.
> But if the content is not match the pattern ,the program will lose
> response.
> Why ? and what shall I do?
>
>
>
>
>