📜  用于 url 的 python 正则表达式 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:34.125000             🧑  作者: Mango

代码示例1
import re

url = '

Hello World

More ExamplesEven More Examples' urls = re.findall('https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+', url) >>> print urls ['http://example.com', 'http://example2.com']