title: Replace the special character and space from the string in javascript
body: <p>I have a below string. I need to remove all the special character and space.</p>
  
  <pre><code>var Uid = "s/Information Needed1-s84102-p306";
  </code></pre>
  
  <p>I tried the below code.It didn't replace the space from the string.</p>
  
  <pre><code>console.log(Uid.replace(/[^\w\s]/gi, '')}")
  </code></pre>
  
  <p>The output is:-    <strong>sInformation Needed1s84102p306</strong></p>
  
  <p>I want the output as <strong>sInformationNeeded1s84102p306</strong></p>