Enable the ability to use Capturing Groups as part of the replacement in Environment Variables when using Regex
Twice now we have run into issues with deployments that would be satisfied by having the ability to use the capturing groups of the Regex expression in the Environment Variable to populate parts of the replacement.
A good example of this is usernames in Assignment Rules. Salesforce exports the assignment rule metadata from a developer sandbox without the sandbox name on the end. So, in the metadata file it has user@domain.com instead of user@domain.com.sbx.
In criteria you can also be filtering on email addresses, so if you just look for @domain.com in the environment variable, it will also find email addresses in the criteria for the same domain. If this is the case, you can use a look-ahead format in the Regex to exclude those email addresses from the environment variable, but that means you have to match on the entire email address and not just the @domain.com part. Therefore, you need to include the full username in the replacement into the pipeline environments in order for them to be deployed successfully. If you capture that in a capturing group in the regex, you can simply use $1.sbx to change the user names to the sandbox relevant user names.
This has come up in another use case as well, but it would just be useful to have as a tool in GS.