Answers for "regex url in string python"

1

regex url in string python

import re
 
with open("path\url_example.txt") as file:
        for line in file:
            urls = re.findall('https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+', line)
            print(urls)
Posted by: Guest on June-22-2021

Browse Popular Code Answers by Language