title: About regular expressions in js
body: <p>I am a noob with js and a was wondering if I can search and replace characters in a string using regular expressions but with some rules like for ex:</p>
  
  <p>Let's say I want to search and replace every whitespace that is before a semicolon, the code will be something like this:</p>
  
  <pre><code>someString.replace(/\s*;/, "");
  </code></pre>
  
  <p>But when I do this, of course that the ';' it's gonna be replaced by the "". My question is: is there a way of deleting all whitespaces before a semicolon but without deleting the semicolon? </p>
  
  <p>Thanks for your answers!!!</p>