title: Oracle 11g - Check constraint with RegEx
body: <p>I'm using Oracle 11g, and trying to create a table define constraints on the creation.</p>
  
  <p>I was trying to add check constraint to validate some information (like e-mail address, phone number, etc...)</p>
  
  <p>Is there something in Oracle 11g that would allow me to do something like this?</p>
  
  <pre><code>constraint CK_CONSTRAINT_NAME check (EMAIL like 'REGEX')
  </code></pre>
  
  <p>The regEx I wanted to use (grabbed from regexLib) is:</p>
  
  <pre><code>^[a-zA-Z][a-zA-Z0-9_\.\-]+@([a-zA-Z0-9-]{2,}\.)+([a-zA-Z]{2,4}|[a-zA-Z]{2}\.[a-zA-Z]{2})$
  </code></pre>
  
  <p>I think Oracle 11g (correct me if I'm wrong) doesn't support this format for RegEx...</p>
  
  <p>I've seen methods using REGEX_LIKE, but it seems to only work in <code>WHERE</code> clauses.</p>
  
  <p>I'd like to keep it as a check constraint and not a trigger or an external function/script.</p>
  
  <p>Also, I've read in other threads here, someone saying RegEx' are not a good way of verifying e-mail address format and such information. No reason was given in the comment, and I'd like to know why, if a reason there is!</p>