title: having trouble getting text from a text box to match a regular expression
body: <p>No matter what I type into StreetAddress, it never matches the regex. Whether it be PO Box PO BOX po box. I can't seem to get this to work. Any ideas?</p>
  
  <pre><code>   function valPoBox(sender, args) {
          var hasPObox = new RegExp('\b[P|p]*(OST|ost)*\.*\s*[O|o|0]*(ffice|FFICE)*\.*\s*[B|b][O|o|0][X|x]\b');
          var StreetAddress = $('.streetaddress').val();
  
          if (StreetAddress.match(hasPObox)) {
              args.IsValid = false;
  
              sender.ErrorMessage = "Address must not contain P.O. Box";
  //            $('.valPoBox').attr("ErrorMessage", sender.ErrorMessage);
          }
          else {
              args.IsValid = true;
          }
          $('.valPoBox').attr("errormessage", sender.ErrorMessage);
      }
  </code></pre>