title: JS regexp for PO Box
body: <p>I am using javascript to catch any PO box expressions in my address field.
  My regexp looks like this right now:</p>
  
  <pre><code>var pattern = /(p[-. ]?o.?[- ]? )b(.|ox)/i;
  </code></pre>
  
  <p>The problem is that it will not catch the following expressions:</p>
  
  <pre><code>P. O. Box
  </code></pre>
  
  <p>but will catch:</p>
  
  <pre><code>P.O. Box
  </code></pre>
  
  <p>How can I modify my code so that it will catch an expression with a space between <code>P</code> and <code>O</code>, and still catch <code>po box</code>?</p>