ElenaSokol

Extract_the_links

Mar 24th, 2022
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. import re
  2.  
  3. text = input()
  4. pattern = r'www.([a-zA-Z0-9\-]*)(\.[a-zA-Z0-9]*)'
  5. links = re.finditer(pattern, text)
  6.  
  7. for link in links:
  8.     print(link[0])
Advertisement
Add Comment
Please, Sign In to add comment