Have a look on the option “-o” (–only-matching) of grep command.
By default grep keep lines that match the given pattern. With the option ‘-o’, grep will keep only the part of the line that match your url pattern
0
solved How to create list of jpg urls from file?