Let's say i have a string like this: "/c1/client/{clientId}/field/{fieldId}/version/{versionId}/file/{filename}"
I want to replace all values inside curly brackets with the actual values, so the link would look like this:
"c1/client/Tudor/field/search/version/1/file/hello.txt".
How can i do that in a way that does not limit the number of parameters used? Because i have some requests with 4 parameters (like this one) and others with only one parameter, or none. What is the best way to do this?
Edit: I would need something like: Search string for any values between {}. If string contains {value}, take all {values} and replace with parameter.