Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- class ExtractURLsFromText
- {
- static void Main()
- {
- string input = Console.ReadLine();
- Regex linkParser = new Regex(@"\b(?:http://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
- foreach (Match m in linkParser.Matches(input))
- {
- Console.WriteLine(m);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement