Terraform has a few regex related functions built in, but they are not entirely friendly with standard regex (like PCRE).
In general they conform to the standard, but they also introduce some confusion with the way that terraform has to process the inputs, and so far as I can tell they have very limited match replacement patterns (looks like only capture group $n referencing)
My Use Case
I have been trying to jerry-rig a solution to an issue with their yamlencode() function, which outputs yaml format but with every value treated as a string and wrapped with \". My goal has been to remove the \"'s from the Keys as well as selectively from the Values depending on if they are INT values or STR values. I have an issue submitted to TF right now trying to point out part of the issue. (https://github.com/hashicorp/terraform/issues/33167) but it would be nice if there was a flavor in Regex101 that could help either debug this quicker or could show the limitations of TF regex.
Flavor Request - Terraform
Terraform has a few regex related functions built in, but they are not entirely friendly with standard regex (like PCRE).
In general they conform to the standard, but they also introduce some confusion with the way that terraform has to process the inputs, and so far as I can tell they have very limited match replacement patterns (looks like only capture group $n referencing)
My Use Case
I have been trying to jerry-rig a solution to an issue with their yamlencode() function, which outputs yaml format but with every value treated as a string and wrapped with \". My goal has been to remove the \"'s from the Keys as well as selectively from the Values depending on if they are INT values or STR values. I have an issue submitted to TF right now trying to point out part of the issue. (https://github.com/hashicorp/terraform/issues/33167) but it would be nice if there was a flavor in Regex101 that could help either debug this quicker or could show the limitations of TF regex.