I am not so into JavaScript and I have the following problem.
I have a string like this:
https://smart.XXX.it/default.asp/s4
into a var
a = 'https://smart.XXX.it/default.asp/s4'; a = a.split('/'); a = a.filter((item)=>{ return item.indexOf('default.asp') === -1; }); a = a.join('/');