Without resorting to using regex, is there a way to do so if I saved my array into json format? I'm interesting in json only because I'm using mongodb so the output comes out in json format. I have a field called docroot
which is essentially a directory path.
docroot : "secure.unstable.qa.example.com"
The only two pieces that could change depending on other factors are unstable
and qa.
What I'm hoping for is a way to place "markers" so that they could easily be replaced with an appropriate variable.
For example:
docroot : "secure.{STREAMS}.{ENV}.example.com"
docroot : "unsecure.{STREAMS}.{ENV}.example.com"