E
erxuan
The situation is like this:
Given a paragraph, there are 3 subsections that I want to capture and
they have subtitles "Restaurant Description", "Best Known For" and
"Reviews" respectively.
The paragraph can be something like this: "blah blah0... Restaurant
Description blah blah1... Best Known For blah blah2... Reviews blah
blah3..."
I was trying to use
Pattern = "Restaurant Description(.*?)Best Known
For(.*?)Reviews(.*)"; to capture the 3 subsections and then assign
the values to different labels:
string Descritpion = m.Groups[0].ToString();
string Specialities = m.Group[1].ToString();
string Reviews = m.Group2.ToString();
However, any subsection can be optional. The paragraph can be "blah
blah0 ...Best Known For blah blah1..."
What Regex should I use so that I can capture the right subsection
under such situation?
Thanks a lot!
Given a paragraph, there are 3 subsections that I want to capture and
they have subtitles "Restaurant Description", "Best Known For" and
"Reviews" respectively.
The paragraph can be something like this: "blah blah0... Restaurant
Description blah blah1... Best Known For blah blah2... Reviews blah
blah3..."
I was trying to use
Pattern = "Restaurant Description(.*?)Best Known
For(.*?)Reviews(.*)"; to capture the 3 subsections and then assign
the values to different labels:
string Descritpion = m.Groups[0].ToString();
string Specialities = m.Group[1].ToString();
string Reviews = m.Group2.ToString();
However, any subsection can be optional. The paragraph can be "blah
blah0 ...Best Known For blah blah1..."
What Regex should I use so that I can capture the right subsection
under such situation?
Thanks a lot!