python中通用匹配网址的正则表达式

通用匹配网址的正则表达式

http = r'((http|ftp|https)://)
(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|
([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))
(:[0-9]{1,4})*(/[a-zA-Z0-9\&%_\./-~-]*)?'

猜你喜欢

转载自blog.csdn.net/weixin_43226574/article/details/85321450