Extracting all lines from CLOB that begin with a letter or digit

29 views Asked by At

I am trying to extract from a CLOB only those lines that begin with a letter or a number using REGEXP_SUBSTR All the lines I want to keep, start with a letter or digit. All the lines I want to delete start with \ or { or } or are blank. Here is a sample from the CLOB

{\rtf1 \ansi 
{\colortbl;
\red0\green0\blue0;
{\*\generator Apache 
XML Graphics RTF 
Library;}
Customer Screening 
Questionnaire
\par 
}
{\b0 \cf1 \f3 \ri0 \i0 \ql 
}{
{\trowd \itap0 \trleft0 
\clpadt20 \clpadft3 
Originating Source: 
Customer
\cell 

Many thanks Anthony

I am using Oracle SQL.

I have tried

 SELECT REGEXP_SUBSTR(txt, '^.*[:alnum:].*$',1,1,'m') 
 from table1

but the output I get is {\rtf1 \ansi I have tried adding to_clob Fx but with the same output.

0

There are 0 answers