title: Replace string with regex in swift
body: <p>I want to replace a portion of a string that matches a regex pattern.  </p>
  
  <p>I have the following regex pattern:</p>
  
  <pre><code>(.+?)@test\.(.+?)
  </code></pre>
  
  <p>And this is a string replacement pattern:</p>
  
  <pre><code>$1@hoge\.$2
  </code></pre>
  
  <p>How can I use them inside Swift code?</p>