I would like this url:
http://bulk-click.startappsdasdasice.com/tracking/adClick?d=scsdc%20cdcsc%20c
to become
bulk-click.startappsdasdasice.com/tracking
I need this kind of pattern for all urls. so the string with the question mark and onward need to be deleted
There are several ways for this one of them is
var url="http://bulk-click.startappsdasdasice.com/tracking/adClick?d=scsdc%20cdcsc%20c";
var suburl=url.substring(0,url.lastIndexOf("/")).replace(/(^\w+:|^)\/\//, '');
console.log(suburl);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With