title: How to convert Php regular expression into js
body: <p>I have a regular expression in PHP and its working fine but i want to use it in js as well can any please tell me how to do that i am not much familiar with it</p>
  
  <p>In php this expression is working like this it allow hyphen symbol (-) between number and character but remove hyphen symbol between characters and replace it with white space Like if i use any of this string </p>
  
  <pre><code>$string ="Al-Abbas - Manama - 100" or
  $string ="100 - Al-Abbas - Manama"
  
  $repl = preg_replace('/\d\h*-\h*(*SKIP)(*F)|-(?!\h*\d)/', ' ', $string);
  </code></pre>
  
  <p>after this i am getting this output  </p>
  
  <pre><code>Al Abbas Manama - 100
  100 - Al Abbas Manama 
  </code></pre>
  
  <p>i want to do same like this in javascript how can i convert this expression in javascript or any other way to do like this in javascript.</p>