I have a URL like this:
"/parameterOne/parameterTwo/parameterThree/parameterFour/ParameterFive"
I want to firstly find the substring 'paramaterOne', then find the word immediately after this substring between the slashes which is 'paramterTwo'.
This is the RegEx I have written so far:
\parameterOne\b\/[^/]*[^/]*\/
It returns both 'parameterOne' and 'parameterTwo'. How can I modify this to only return 'parameterTwo' or is there a JavaScript solution that is better?
I do not want to find this parameter by index, it is important I have to find parameterOne first and then find parameterTwo immediately after.
\/parameterOne\/([^\/]*)\/