简体   繁体   中英

Regex to capture log that is not parsed with multi-line option

I'm trying to filter out transfer.sh URLs using regex. 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM