title: Alter Regex to validate email Domain on RFC 5322 from Java to Oracle sql
body: <p>I need to alter the <em>below Regex</em> to validate emails domains in a oracle database, according to RFC 5322, 
  and ensuring that the criteria below are respected as well.</p>
  
  <p>Domain rules that must be respected:</p>
  
  <ol>
  <li>must start an end with a letter or digit and be between 1 and 63 characters long.</li>
  <li>may contain uppercase and lowercase Latin letters (A to Z and a to z).</li>
  <li>may contain digits 0 to 9, provided that top-level domain names are not all-numeric.</li>
  <li>may contain hyphen -, provided that it is not the first or last character, and not consecutive also.</li>
  <li>must have at least 2 or more characters (abc@t.com is not valid, but abc@tt.com is valid).</li>
  </ol>
  
  <p>I found on the internet the regex below, that works very well and ensure the rules posted above, in Javascript.
  My problem is that ORACLE does not support look-ahead/-behind. </p>
  
  <pre><code>@(?:(?=[A-Z0-9-]{1,63}\.)[A-Z0-9]+(?:-[A-Z0-9]+)*\.){1,8}[A-Z]{2,63}$
  </code></pre>
  
  <p>So, can anyone please help me on making the necessary modifications in order to work in Oracle sql?</p>