Open beppe9000 opened 2 years ago
Exactly what I'm looking for. Any solution ?
Of course I could do:
ag "url: (.*)" -o --nofilename --nocolor | grep -oP "http.*"
But this is not really satisfying
For future reference, I'm now using RipGrep that allows group capturing and more
let's say i want to print an url from a stream. I would use a regex like this
cat requrest.txt | ag "location: (https\:\/\/www\.example\.com\/.*\n)"
but I don't know how to make it print only the capture group (which is the url, without the location part.)