title: Regex patterns in Java vs Javascript
body: <p>I have java Regex pattern for UK Postcode:</p>
  
  <pre><code>^([a-zA-Z]){1}([0-9][0-9]|[0-9]|[a-zA-Z][0-9][a-zA-Z]|[a-zA-Z][0-9][0-9]|[a-zA-Z][0-9]){1}([ ])([0-9][a-zA-z][a-zA-z]){1}$
  </code></pre>
  
  <p>I want to use it in Javascript as well but it does not validate Postcodes correctly in Javascript.
  Is there any difference between Regex patterns in Java and Javascript?</p>