title: How to make Whitespace optional in Regex
body: <p>I have a regex which validate UK post code. I want it to make white space optional. How can I do it?</p>
  
  <pre><code>jQuery.validator.addMethod("postcodeUK", function (value, element) {
          return this.optional(element) || /[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][ABD-HJLNP-UW-Z]{2}/i.test(value);
      }, "Please specify a valid Postcode");
  </code></pre>