title: Javascript function to remove leading dot
body: <p>I have a javascript string which have a leading dot. I want to remove the leading dot using javascript replace function. I tried the following code.</p>
  
  <pre><code>var a = '.2.98»';
  document.write(a.replace('/^(\.+)(.+)/',"$2"));
  </code></pre>
  
  <p>But this is not working. Any Idea?</p>