var url = "https://ad.atdmt.com/c/go%3Bp%3D11087210245365%3Bev.a%3D1%3Bidfa%3D%3Baai d%3D%3Bidfa_lat%3D%3Baaid_lat%3D%3Bcache%3D" reg = /\/+/; alert(url.split(reg)[1]);