title: go-template split string by delimiter
body: <p>I have my own helm chart and I'm trying to perform split without using the <code>_helpers.tpl</code> in one line</p>
  
  <p>my <code>values.yaml</code> file content:</p>
  
  <pre><code>deployment:
      domain: my.domain
  </code></pre>
  
  <p>I need to split domain name in my template file: <code>my.domain</code></p>
  
  <p>I have tried to perform this by using the following syntax:</p>
  
  <pre><code>name regex (.*)\.{{ (split .Values.deployment.domain ".")._0 }}\.{{ (split .Values.deployment.domain ".")._1 }}
  </code></pre>
  
  <p>or</p>
  
  <pre><code>{{- $split := .Values.deployment.domain "." . }}
  name regex (.*)\.{{ first split }}\.{{ second split }}
  </code></pre>
  
  <p>But nothing worked</p>
  
  <p>I'm trying to get the following results in my template file:</p>
  
  <pre><code>name regex (.*)\.my\.domain
  </code></pre>