In DQL, I’m trying to parse an url to extract usefull data.
Example: https://api-services.unknown.com/env/v6/permissions/check
I want to extract api version which is v6 in this case. Then, I want all the following, which would be /permissions/check
Both data would be in separate fields.
I have tried a lot things with parse but never managed to do it, whether it would be simple with a classic regexp.
I have read DPL Grammar documentation as well as DPL Lines and Strings, but I don’t understand how to build the parse command for my need.
Right now, I am using this: | fieldsAdd relativePath = substring(requestUrl, from: indexOf(requestUrl, “/”, from: 8))
It isn’t very good, but it is still better than the full url !