Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to export from Oracle to text using Perl
Karsten Farrell <kfarrell_at_belgariad.com> wrote in message news:<MPG.1950edd1b793a2309897c6_at_news.la.sbcglobal.net>...
>
> Yes, Perl is a nice - though cryptic - language. How many developers
> have wished that SQL included regular expressions?
Speaking of regular expressions, the OWA_PATTERN package offers some functionality. But the usage is awkward:
SQL> select * from regexptest;
STR
SQL> declare b boolean;
2 begin
3 for i in (select str from regexptest) loop
4 b := owa_pattern.match(i.str, '.* \d\d\d[!.,]'); 5 if (b = true) then 6 dbms_output.put_line(i.str); 7 end if;
PL/SQL procedure successfully completed.
The above regexp says any characters followed by space, 3 digits and any of "!", "," or ".".
Asktom offers a better solution, a Java package from http://www.savarese.org/oro/software/OROMatcher1.1.html.
Yong Huang Received on Wed Jun 11 2003 - 23:30:43 CDT