摘要: 记录一下,经常用到的一些python小工具1.验证一个字符串是否为urlregex = re.compile( r'^(?:http|ftp)s?://' # http:// or https:// r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' #domain... r'localhost|' #localhost... r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ... 阅读全文
posted @ 2013-09-02 19:06 夏木友人 阅读(284) 评论(0) 推荐(0) 编辑