Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Text.RegularExpressions;
- class ExtractText
- {
- static void Main()
- {
- StreamReader reader = new StreamReader(@"..\..\..\text.html");
- using (reader)
- {
- string line = string.Empty;
- MatchCollection matchProtocolAndSiteName = Regex.Matches(line, @"(?<=^|>)[^><]+?(?=<|$)");
- while ((line = reader.ReadLine()) != null)
- {
- matchProtocolAndSiteName = Regex.Matches(line, @"(?<=^|>)[^><]+?(?=<|$)");
- foreach (var word in matchProtocolAndSiteName)
- Console.WriteLine(word);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement