I need a python one-liner that will return all URLs found in a string and put it into a bash array. Something like:
URLs=($(echo 'foo bar baz http://blackfridaygift.info/BUu4nmkRR baz foo bar http://inhelation.com/fil/iowa/lvmk65irqibpmi972hz6xx2k.php%3FLA4i9C1606274697520fdd2ad4cf649e25ae72996c901bf1520fdd2ad4cf649e25ae72996c901bf1520fdd2ad4cf649e25ae72996c901bf1520fdd2ad4cf649e25ae72996c901bf1520fdd2ad4cf649e25ae72996c901bf1' | python -c 'something here'))
I've spent the last hour googling but can't seem to find the right answer.
Using
regular expression
to matchhttp:....
orhttps:...
.By converting into single line...