Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to export from Oracle to text using Perl

Re: How to export from Oracle to text using Perl

From: Yong Huang <yong321_at_yahoo.com>
Date: 11 Jun 2003 21:30:43 -0700
Message-ID: <b3cb12d6.0306112030.17e75dce@posting.google.com>


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



text numbers 123!

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;

  8 end loop;
  9 end;
 10 /
text numbers 123!

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US