I have string like this - "https://gaana.com/song/dil-chahte-hohttps://www.youtube.com/watch?v=MWnFCGXjjS0&list=PLs1-UdHIwbo5p-8wh740E7CRhIoKq5APmhttps://www.youtube.com/watch?v=MWnFCGXjjS0&list=PLs1-UdHIwbo5p-8wh740E7CRhIoKq5APm"
In here I have three urls, how can i separate them and push them into an array. the url's can be start with http or https or directly from www or any valid url. I want the output like -
[
"https://gaana.com/song/dil-chahte-ho",
"https://www.youtube.com/watch?v=MWnFCGXjjS0&list=PLs1-UdHIwbo5p-8wh740E7CRhIoKq5APm",
"https://www.youtube.com/watch?v=MWnFCGXjjS0&list=PLs1-UdHIwbo5p-8wh740E7CRhIoKq5APm"
]
https://within them, so it isn't going to be possible for you to separate them unless you know something about the URLs. For example, if you're always dealing with YouTube, this isn't going to be a problem. But if you have to handle arbitrary URLs, this isn't going to work reliably. Where are you getting the string from? Can you change it?