Given a string like:
https://www.test.com/http://www.test2.com COOL http://www.test3.com/http://www.test4.com
How can I write a regex string that will output this into an array of 4?
Output: ['https://www.test.com/, 'http://www.test2.com COOL', 'https://www.test3.com/', 'https://www.test4.com']
The issue I am having is knowing how to tell the regex to end at the next occurrence of either https or http since in the string example, there may or may not be a space between each URL or an ending /
My regex so far: (https:\/\/www.|http:\/\/www.)