[英]Regex to capture log that is not parsed with multi-line option
I'm trying to filter out transfer.sh
URLs using regex. 我正在尝试使用正则表达式过滤掉
transfer.sh
URL。 The catch here is that the log isn't parsed with "multiline" option but instead as a whole log. 这里要注意的是,该日志不是使用“多行”选项解析的,而是整个日志。
I have the regex that I designed available here: https://regex101.com/r/vx94RA/2 我在这里有我设计的正则表达式: https : //regex101.com/r/vx94RA/2
I want the output to be: 我希望输出为:
https://transfer.sh/JKdZg/pkbuild.txt
https://transfer.sh/nfs2l/var_log.tar
https://transfer.sh/PsafD3/systemd_journal.txt
But, the regex that I designed is able to capture only the first entry 但是,我设计的正则表达式只能捕获第一个条目
Your regex is returning after the first match. 您的正则表达式在第一场比赛后返回。 Enable the global flag.
启用全局标志。
https://regex101.com/r/vx94RA/3 https://regex101.com/r/vx94RA/3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.