title: how to use regular expression to replace dynamic id
body: <p>I have a testing url which can be</p>
  <pre><code>const test = '/test/:complainId';
  </code></pre>
  <p>or</p>
  <pre><code>   const test = '/test/:uarId';
  </code></pre>
  <p>How I should use regular expression to replace complainId or uarId  with &quot;123&quot;?</p>
  <pre><code>console.log(test.replace(regex, '123')) -&gt; '/test/123'
  </code></pre>