Regular expression induced the program can't respond

C

ch2x

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top