In my current Javascript code I'm using:
.match(/[^/]+$/)
to get the final element of an url. For example, appltying it to:
/country/set/profile/yellow
would return me yellow. Now, I'm facing a problem, as I will need the element that always comes after /country/. for example, applying this new regex to:
/country/set/profile/yellow
would return me set. I've been trying a lot of things, but without any success. Any idea on how to solve this?
/, find the index ofcountry, and+1..*but it didn't work. that you downvoter guys are happy?