问题描述
我想获取http://www.fef.com/product/123465的http://www.fef.com求助下正则谢谢
问题解答
回答1:/https?://.+?(?=/)/
回答2:/^http://[a-zA-Z.]+.(com)|(cn)$/
回答3:/^https?://[a-zA-Z0-9.]+.[a-zA-Z]{2,12}/
试试这个,刚写的,能匹配http、https和New gTLD

问题描述
我想获取http://www.fef.com/product/123465的http://www.fef.com求助下正则谢谢
问题解答
回答1:/https?://.+?(?=/)/
回答2:/^http://[a-zA-Z.]+.(com)|(cn)$/
回答3:/^https?://[a-zA-Z0-9.]+.[a-zA-Z]{2,12}/
试试这个,刚写的,能匹配http、https和New gTLD
相关文章:

网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主