[英]How to match a URL at end of a line with regex
我必須找到一個模式來只匹配這樣的列表的 URL:
one | two | three | four | http://www.site/whatever-the-site-uses
one | two | three | four | http://www.site/whatever-the-site-uses
one | two | three | four | http://www.site/whatever-the-site-uses
我需要在 SINGLE GROUP 中獲取整個 http 或 https,但我找不到合適的模式
有人能幫我嗎? 到目前為止,我有\\|(.*?)/$
,但結果類似於
| two | three | four | http://www.site/whatever-the-site-uses
我理解你對嗎? 從最后一個 "| https://" 捕獲以https凝視的組? 到行尾
是這個嗎?
/\|\ (https?\:\/\/.*)$/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.