title: Removing everything except capital letters using replace
body: <p>Yeah, I'm trying to remove everything except the capital letters, though it doesn't really seem to go well.</p>
  
  <p>I used the following code,</p>
  
  <pre><code>String.replace(/(?![A-Z])./, '');
  </code></pre>
  
  <p>It doesn't seem to work properly, while it does work using PHP.</p>