Or better, do not use regex because the URI has an inherent structure/convention that many APIs adhere to. (See, e.g., Re: How do I modify my rex command to remove direc...) What you ask is the second to last segment of HTTP_PATH variable in CGI standard.
| eval actionID = mvindex(split(httpURL, "/"), -2)
Semantic code is easier to maintain and in this case, potentially cheaper than regex.
Hi @anil1219,
if the structure of the URL is fixed, you could use
| rex "\/\w+\/\w+\/\w+\/(?<your_field>[^\/]+)"
that you can test at https://regex101.com/r/K3yj0E/1
Cio.
Giuseppe