Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow search/replace option in json #26

Open
jmichaud-ips opened this issue Apr 6, 2016 · 2 comments
Open

Allow search/replace option in json #26

jmichaud-ips opened this issue Apr 6, 2016 · 2 comments

Comments

@jmichaud-ips
Copy link

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]+"
}

@harshil93
Copy link
Member

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.

@jmichaud-ips
Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants