title: hive regexp_extract
body: <p>I use <code>regexp_extract()</code> to extract substring from string.</p>
  
  <p>One type of substring looks like: <code>Abc-Def-ghi</code><br>
  I use <code>regexp_extract(s, '^[a-zA-Z0-9]{1,}\-[a-zA-Z0-9]{1,}\-[a-zA-Z0-9]{1,}')</code>) to get it.</p>
  
  <p>The other type of substring looks like: <code>wp.Abc-Def-ghi</code></p>
  
  <p>How can I get both types of strings using one <code>regexp_extract()</code>?</p>