title: how to delete words using REGEXP_REPLACE in Oracle
body: <p>I need help with REGEXP_REPLACE on an Oracle database.
  I wanted to cut everything from the following string to the phrase [Teradata Database] and leave the rest, and if [Teradata Database] is not in the string then leave it unchanged.</p>
  <p>I have tried to solve this problem in this way, but unfortunately it does not work.</p>
  <pre><code>select TRIM(REGEXP_REPLACE('2021.07.29 13:45:36  ERR   GEOSPATIAL_LOCATOR_CBS.sql /mup/projects/IDM IDM   IdmLoadDetailLayer.sql  226   3706 42000 [Teradata Database] [TeraJDBC 17.10.00.14] [Error 3706] [SQLState 42000] IDM_UPSERT_FORMER:Syntax error: expected something between '','' and '',''.', '.*(\[Teradata Database\] : .* [^.]+)')) AS ERROR_MESSAGE from dual;
  </code></pre>
  <p>Correct result:</p>
  <p>[Teradata Database] [TeraJDBC 17.10.00.14] [Error 3706] [SQLState 42000] IDM_UPSERT_FORMER:Syntax error: expected something between ',' and ','.</p>
  <p>Thanks in advance for your help</p>