title: SQL Substring REGEX pattern matching (TERADATA)
body: <p>I have a column say <code>LINES</code> with the below string patters. I want to extract the date from the strings. For example for each lines I would need the date i.e <code>20201123</code> or <code>20201124</code> whichever the case may be.
  Since the dates are in different positions I can't really use <code>substring</code> for this. How do I go about this ? Is there a simpler REGEX method within <code>substring</code> that I can apply to this.</p>
  <p>Here is a simple reproduced code for testing.</p>
  <pre><code>create volatile table TEST
  (LINES VARCHAR(1000) CHARACTER SET LATIN NOT CASESPECIFIC)
  ON COMMIT PRESERVE ROWS;
  
  insert into TEST values('path/to/file/OVERALL_GOTO_Datas.20201123.dat');
  insert into TEST values('path/to/file/endartstmov20201124.20201124.dat');
  insert into TEST values('path/to/file/TESTDEV20201123.20201123.5.0014.CHK.dat');
  insert into TEST values('path/to/file/DEVTOTES20201124.20201124.5.0109.CHK.dat');
  insert into TEST values('path/to/file/STORE_PARTNER.20201124.20201124.0.0501.CHK.dat');
  
  SELECT * FROM TEST;
  </code></pre>
  <p>Appreciate your responses. Thanks.</p>