Open jmichaud-ips opened 8 years ago
Why would you want a part of the string to be replaced with the value. You can specify the whole value instead of partial value for replacement.
I have a scenario with multiple WCF endpoints in a config. The first half is the base URL, which is always the same. The second half is a unique string per endpoint. I don't want to make a transform JSON for each endpoint (at least 6 of them).
An additional optional property in the JSON config could be added for a search string. If it exists, then only that search string gets replaced with the string specified in Value instead of the whole attribute. Valid values in ReplaceSearchString are anything the powershell -replace method can support, which includes regex. See below for example: { "KeyName": "/configuration/appSettings/add[@key='API_URL']", "Attribute":"value", "Value":":ApiPort", "ReplaceSearchString":":[0-9]+" }