问题描述
我想获取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
相关文章:1. linux - liunx在编译的时候,如果关闭了xshell窗口 如何再次查看编译的过程?2. linux - 编译安装了mysql 5.6,为什么mysql安装目录下scripts木有呢?3. Linux下C语言的一道经典面试题4. 安装完nginx后要把原来的配置文件清空吗?5. 32岁了是否还适合转行做Linux6. 前端 - 如何优化 goagent.org 的页面载入速度?7. mysql 使用 join 还是 "," 进行多表查询???8. nginx里面的sites-available和sites-enabled有什么区别9. How to start Ubuntu desktop after two times ssh login my server?10. 服务器是怎么做到安全防御的呢?

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