First you can split it by white space
var givenText = '...Ready For It?" https://example2.com/rsKdAQzd2q (@BloodPop ® Remix) out now - https://example.com/rsKdAQzd2q'
var allWords = givenText.split(' ');
Than you can filter out non url words using your own implementation for checking URL, here we can check index of :// for simplicity
var allNonUrls = allWords.filter(function(s){ return
s.indexOf('://')===-1 // you can call custom predicate here
});
So you non URL string will be:
var outputText = allNonUrls.join(' ');
// "...Ready For It?" (@BloodPop ® Remix) out now - "