A user on my site will enter a url of the form
url = "https://www.website.com/shop/SHOPNAME/location/LOCATION"
I would like to extract the SHOPNAME and LOCATION substrings. The structure of the input url will always be of this form (or at least if they are not I will return an error). I have found answers on how to parse out particular characters, a certain suffix or a certain prefix but not two different substrings.
I require these strings to make an HTTP get request to my server. The alternative to extracting the strings, if I could send the full url over the HTTP request I can change my server side application easily for what is required. To do this I would need to prepend ever / with a \ (I think) - so alternatively if anyone had a solution for that it would be amazing!
Any help on this would be greatly appreciated! Thanks