为了账号安全,请及时绑定邮箱和手机立即绑定

正则表达式从斜杠提取内容到行尾、斜杠或查询字符串

正则表达式从斜杠提取内容到行尾、斜杠或查询字符串

Go
慕仙森 2023-08-07 14:42:35
我试图将任意深度的路径中的最后一个斜杠与路径的末尾相匹配。我如何调整这个以便示例一匹配?([^/]+[.html]?)/?\?https://www.somedomain/path/some-slug-94690(不匹配)https://www.somedomain.com/one/somepath/another-slug?test(another-slug )https://www.anotherdomain.com/somepath/another-slug/?test(another-slug)https://www.anotherdomain.com/path/another_slug.html?test=true(another-slug)https://regex101.com/r/bFz9mw/1
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 113 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号