title: How to convert PHP regex to JavaScript regex
body: <p>I am currently porting my web app codes from PHP to JS.</p>
  
  <p>I am having an issue with this regex. from PHP</p>
  
  <pre><code>/\(\d*\)|\/\(P\)\//
  </code></pre>
  
  <p>used like this  </p>
  
  <pre><code>preg_replace('/\(\d*\)|\/\(P\)\//', '', $string);
  </code></pre>
  
  <p>how can I convert this to work on JS ?</p>
  
  <pre><code>str.replace();
  </code></pre>
  
  <p>Thank you in advance</p>