I am parsing an html page using the Html Agility Pack. I am successful in getting the following text in a string:
WOCN11 CWTO 170951 Special weather statement Updated by Environment Canada At 5:51 AM EDT Friday 17 June 2011. Special weather statement issued for.. Sarnia - Lambton London - Middlesex Oxford - Brant Waterloo - Wellington. --------------------------------------------------------------------- Dense fog patches with near zero visibility have been reported in The above areas. Extra caution is urged for travellers in these areas. Fog is expected to lift shortly after sunrise this morning. END/OSPC ACCN10 CWTO 170735 Forecast of thunderstorm potential for the province of Ontario Issued by Environment Canada at 3:35 AM EDT Friday 17 June 2011. The next statement will be issued at 4.30 PM today. --------------------------------------------------------------------- Forecast of thunderstorm potential. Today..Isolated non severe thunderstorms over eastern And Northeastern Ontario. Tonight..Isolated non severe thunderstorms over eastern and Northeastern Ontario this evening. Saturday..Isolated non severe thunderstorms over extreme Southwestern Ontario mainly late in the afternoon and evening. --------------------------------------------------------------------- A thunderstorm is defined as severe if it produces one or more of the following: - wind gusts of 90 km/h or greater. - hail of 2 centimetres in diameter or greater. - rainfall amounts of 50 millimetres or greater in one hour or less. - a tornado. Note: this forecast is issued twice daily from May 1 to September 30. END/OSPC
And I want to extract only the following part:
Forecast of thunderstorm potential. Today..Isolated non severe thunderstorms over eastern And Northeastern Ontario. Tonight..Isolated non severe thunderstorms over eastern and Northeastern Ontario this evening. Saturday..Isolated non severe thunderstorms over extreme Southwestern Ontario mainly late in the afternoon and evening.
I am using Csharp on .Net 3.5. Any help appreciated.
Question Updated
One way you could do it (although not 100% ideal), is like this:
Assuming of course, that the text you want is always in the 3rd section, and each section is always separated by the ‘——‘ line