title: Get a number out of a dummy string
body: <pre><code>const   str = 'This is _XXX_0_ an example',
          target = ['just', 'nothing', 'bla'];
  </code></pre>
  
  <p>Now I need to get the number out of that string, as <code>_XXX_</code> Number <code>_</code> is a fixed format, to get the element which should replace the dummy string.</p>
  
  <p>I tried this:</p>
  
  <pre><code>str.replace(/_XXX_(/d+)_/, target[$i]);
  </code></pre>
  
  <p>The number value could be something between 0 and 100. What am I doing wrong?</p>
  
  <p>Result for this example is:</p>
  
  <pre><code>This is just an example
  </code></pre>