I want to extract some URLs of a txt file with grep --only-matching and regular expression.
I know only some info about the URL, but I definitely know by what it is enclosed.
so I use grep -o AA.*BB myfile.txt
But this gives my whole expression (i.e. AA"$URL"BB), but I only want the URL i.e. what is enclosed by AA and BB, how do I do that?