title: replace number from the middle using javascript / node js
body: <pre><code>var str = &quot;demo-test-1-0-4_testing.pdf&quot;;
  </code></pre>
  <p>I have a string i want to replace with word <code>verified</code></p>
  <p>so my expected value look like this</p>
  <pre><code>str= demo-test-verified_testing.pdf
  </code></pre>
  <p>I can do this if the numbers are written in last like this</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var str = "demo-test-1-0-1";
  
  str = str.replace(/(?!(-| |_))(\d|-|\.)+\s*$/, "verified");
  
  console.log(str);</code></pre>
  </div>
  </div>
  </p>
  <p>but in middle I don't know
  as my expected value is like this <code>demo-test-verified_testing.pdf</code> as i want to replace <code>1-0-1</code> i can use replace function but every time version get updated so number get changed that's why i cant use replace function</p>