title: How to replace multiple patterns in a single string in Terraform?
body: <p>I am converting Jinja templates to Terraform. I have a variable called <code>timezone</code> which has values like this:</p>
  <p>regex string- (UTC+01:00) Paris, Bohn, Helsinki, Hungary,Sweden, Austria</p>
  <pre><code>timezone: {{ WINDOWSTIMEZONE|replace(&quot;/&quot;,&quot;_&quot;)|replace(&quot;+&quot;,&quot;_plus_&quot;)|replace(&quot;(&quot;,&quot;&quot;)|replace(&quot;)&quot;,&quot;&quot;)|replace(&quot;&amp;&quot;,&quot;and&quot;)|replace(&quot;.&quot;,&quot;&quot;)|replace(&quot;'&quot;,&quot;-&quot;)|replace(&quot;, &quot;,&quot;_&quot;)|replace(&quot;:&quot;,&quot;_&quot;)|replace(&quot; &quot;,&quot;_&quot;)|lower }}
  </code></pre>
  <p>The resultant string in Jinja is
  <code>utc_plus_01_00_paris_bohn_helsinki_hungary_sweden_austria</code>.</p>
  <p>This basically translates to:</p>
  <pre><code>replace(&quot;string&quot;,&quot;/&quot;,&quot;-&quot;)-&gt;resultstring
  replace(resultstring,&quot;+&quot;,&quot;_plus_&quot;)
  replace(resultstring,&quot;(&quot;,&quot;&quot;)
  replace(resultstring,&quot;)&quot;,&quot;&quot;)
  replace(resultstring,&quot;&amp;&quot;,&quot;and&quot;)
  replace(resultstring,&quot;.&quot;,&quot;)
  replace(resultstring,&quot;'&quot;,&quot;-&quot;)
  replace(resultstring,&quot;,&quot;,&quot;_&quot;)
  replace(resultstring,&quot;:&quot;,&quot;_&quot;)
  replace(resultstring,&quot; &quot;,&quot;_&quot;)
  finally lower(resultstring)
  </code></pre>
  <p>I need to replace timezone based on the above pattern, I am trying to use regex but not able to succeed to write a single expression. How to do this with a single regex expression instead of using multiple replace?</p>