CLI tool that extracts a regex pattern from a list of urls. The tool is written in Rust and supports PCRE.
Visit https://rustup.rs/ and follow the instructions to get started with rust and cargo.
> cargo install --git https://github.com/iustin24/rextract
The tool takes a list of urls from stdin and extracts the regex supplied as an argument.
> cat urls.txt
https://www.google.com/
https://youst.in/
> cat urls.txt | rextract '(?im)(?<=<title>).*(?=</title>)'
Google
Youstin
> cat urls.txt
https://www.uuidtools.com/docs
> cat urls.txt | rextract '[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}'
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d