title: RegEx to match Bitcoin addresses?
body: <p>I am trying to come up with a regular expression to match Bitcoin addresses according to <a href="https://en.bitcoin.it/wiki/Address">these specs</a>:</p>
  
  <blockquote>
    <p>A Bitcoin address, or simply address, is an identifier of 27-34
    alphanumeric characters, beginning with the number 1 or 3 [...]</p>
  </blockquote>
  
  <p>I figured it would look something like this</p>
  
  <pre><code>/^[13][a-zA-Z0-9]{27,34}/
  </code></pre>
  
  <p>Thing is, I'm not good with regular expressions and I haven't found a single source to confirm this would <em>not</em> create false negatives.</p>
  
  <p>I've found one online that's <code>^1[1-9A-Za-z][^OIl]{20,40}</code>, but I don't even know what the <code>[^OIl]</code> part means and it doesn't seem to match the <code>3</code> a Bitcoin address could start with.</p>