I'm looking for a regex for extracting urls when they are not separated by a space or whatever, but keep the "redirect" ones a a complete url.
Let me show you an example:
http://foo.barhttps://foo.bazhttp://foo.bar?url=http://foo.baz
should result in the following array:
['http://foo.bar', 'https://foo.baz', 'http://foo.bar?url=http://foo.baz']
I am able to separate urls joined thanks to this regex :
'~(?:https?:)?//.*?(?=$|(?:https?:)?//)~'
from this answer: Extract urls from string without spaces between
But I struggle to also extract the ones by keeping the =http
Thanks,