I have the following string.
http://localhost:8080/test/tf/junk?tx=abc&xy=12345
Now I want to get substring between the third and fourth slash "/" using javascript.
To be more clear, I want to extract test from the above given string.
Can anybody help me out on this?
var index = location.pathname.indexOf("/"); location.pathname.substring(0, index)