Re: [HACKERS] regular expressions from hell - Mailing list pgsql-hackers

From dg@illustra.com (David Gould)
Subject Re: [HACKERS] regular expressions from hell
Date
Msg-id 9806112137.AA04227@hawk.illustra.com
Whole thread Raw
In response to regular expressions from hell  (Brett McCormick <brett@work.chicken.org>)
Responses Re: [HACKERS] regular expressions from hell  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
> I've noticed there are no less then 10^10 regex implementations.
> Is there a standard?  Does ANSI have a regexp standard, or is there
> a regex standard in the ANSI SQL spec?  What do we use?
>
> Personally, I'm a perl guy, so everytime I have to bend my brain to
> some other regex syntax, I get a headache.  As part of my perl PL
> package, perl regexps will be included as a set of operators.
>
> Is there interest in the release of perl-style regexp operators for
> postgres before the PL is completed?  Note that this requires the
> entire perl library to be loaded when the operator is used (possibly
> expensive).  But, if you have a shared perl library, this only has to
> happen once.

Well, not to bring this up for discussion again, but there is apparently
a Posix standard, and even better a free implementation:


Article 10705 of comp.os.linux.misc:
Newsgroups: gnu.announce,gnu.utils.bug,comp.os.linux.misc,alt.sources.d
Subject: Rx 1.9
Date: Wed, 10 Jun 1998 10:40:00 -0700 (PDT)
Approved: info-gnu@gnu.org

The latest version of Rx, 1.9, is available on the web at:

    http://users.lanminds.com/~lord
    ftp://emf.net/users/lord/src/rx-1.9.tar.gz
 and at ftp://ftp.gnu.org/pub/gnu/rx-1.9.tar.gz and mirrors of that
                                                site (see list below).

Rx is a regexp pattern matching library. The library exports these
functions which are standardized by Posix:

     regcomp         - compile a regexp
     regexec         - search for a match
     regfree         - release storage for a regexp
     regerr          - translate error codes to strings

The library exports many other functions as well, and does a lot
more than Posix requires.

                RECENT CHANGES

1. Rx 1.9
   Recent changes: More "dead code" was recently discarded,
           and the remaining code simplified.

           Benchmark comparisons to GNU regex and older
           versions of Rx were added to the distribution.

0. Rx 1.8
   Recent changes: Various bug-fixes and small performance improvements.
           A great deal of "dead code" was recently discarded,
           making the size of the Rx library smaller and the
           source easier to maintain (in theory).


[ Most GNU software is compressed using the GNU `gzip' compression program.
  Source code is available on most sites distributing GNU software.
  Executables for various systems and information about using gzip can be
  found at the URL http://www.gzip.org.

  For information on how to order GNU software on CD-ROM and
  printed GNU manuals, see http://www.gnu.org/order/order.html
  or e-mail a request to: gnu@gnu.org

  By ordering your GNU software from the FSF, you help us continue to
  develop more free software.  Media revenues are our primary source of
  support.  Donations to FSF are deductible on US tax returns.

  The above software will soon be at these ftp sites as well.
  Please try them before ftp.gnu.org as ftp.gnu.org is very busy!
  A possibly more up-to-date list is at the URL
        http://www.gnu.org/order/ftp.html

  thanx -gnu@gnu.org

  Here are the mirrored ftp sites for the GNU Project, listed by country:



  United States:

  California - labrea.stanford.edu/pub/gnu, gatekeeper.dec.com/pub/GNU
  Hawaii - ftp.hawaii.edu/mirrors/gnu
  Illinois - uiarchive.cso.uiuc.edu/pub/gnu (Internet address 128.174.5.14)
  Kentucky -  ftp.ms.uky.edu/pub/gnu
  Maryland - ftp.digex.net/pub/gnu (Internet address 164.109.10.23)
  Michigan - gnu.egr.msu.edu/pub/gnu
  Missouri - wuarchive.wustl.edu/systems/gnu
  New York - ftp.cs.columbia.edu/archives/gnu/prep
  Ohio - ftp.cis.ohio-state.edu/mirror/gnu
  Utah - jaguar.utah.edu/gnustuff
  Virginia - ftp.uu.net/archive/systems/gnu

  Africa:

  South Africa - ftp.sun.ac.za/pub/gnu

  The Americas:

  Brazil - ftp.unicamp.br/pub/gnu
  Canada - ftp.cs.ubc.ca/mirror2/gnu
  Chile - ftp.inf.utfsm.cl/pub/gnu (Internet address 146.83.198.3)
  Costa Rica - sunsite.ulatina.ac.cr/GNU
  Mexico - ftp.uaem.mx/pub/gnu

  Asia and Australia:

  Australia - archie.au/gnu (archie.oz or archie.oz.au for ACSnet)
  Australia - ftp.progsoc.uts.edu.au/pub/gnu
  Japan - tron.um.u-tokyo.ac.jp/pub/GNU/prep
  Japan - ftp.cs.titech.ac.jp/pub/gnu
  Korea - cair-archive.kaist.ac.kr/pub/gnu (Internet address 143.248.186.3)
  Thailand - ftp.nectec.or.th/pub/mirrors/gnu (Internet address - 192.150.251.32)

  Europe:

  Austria - ftp.univie.ac.at/packages/gnu
  Czech Republic - ftp.fi.muni.cz/pub/gnu/
  Denmark - ftp.denet.dk/mirror/ftp.gnu.org/pub/gnu
  Finland - ftp.funet.fi/pub/gnu (Internet address 128.214.6.100)
  France - ftp.univ-lyon1.fr/pub/gnu
  France - ftp.irisa.fr/pub/gnu
  Germany - ftp.informatik.tu-muenchen.de/pub/comp/os/unix/gnu/
  Germany - ftp.informatik.rwth-aachen.de/pub/gnu
  Germany - ftp.de.uu.net/pub/gnu
  Greece - ftp.ntua.gr/pub/gnu
  Greece - ftp.aua.gr/pub/mirrors/GNU (Internet address 143.233.187.61)
  Ireland - ftp.ieunet.ie/pub/gnu (Internet address 192.111.39.1)
  Netherlands - ftp.eu.net/gnu (Internet address 192.16.202.1)
  Netherlands - ftp.nluug.nl/pub/gnu
  Netherlands - ftp.win.tue.nl/pub/gnu (Internet address 131.155.70.100)
  Norway - ugle.unit.no/pub/gnu (Internet address 129.241.1.97)
  Spain - ftp.etsimo.uniovi.es/pub/gnu
  Sweden - ftp.isy.liu.se/pub/gnu
  Sweden - ftp.stacken.kth.se
  Sweden - ftp.luth.se/pub/unix/gnu
  Sweden - ftp.sunet.se/pub/gnu (Internet address 130.238.127.3)
         Also mirrors the Mailing List Archives.
  Switzerland - ftp.eunet.ch/mirrors4/gnu
  Switzerland - sunsite.cnlab-switch.ch/mirror/gnu (Internet address 193.5.24.1)
  United Kingdom - ftp.mcc.ac.uk/pub/gnu (Internet address 130.88.203.12)
  United Kingdom - unix.hensa.ac.uk/mirrors/gnu
  United Kingdom - ftp.warwick.ac.uk (Internet address 137.205.192.14)
  United Kingdom - SunSITE.doc.ic.ac.uk/gnu (Internet address 193.63.255.4)

]

-dg

David Gould            dg@illustra.com           510.628.3783 or 510.305.9468
Informix Software  (No, really)         300 Lakeside Drive  Oakland, CA 94612
"Don't worry about people stealing your ideas.  If your ideas are any
 good, you'll have to ram them down people's throats." -- Howard Aiken

pgsql-hackers by date:

Previous
From: Sidney Traynham
Date:
Subject: Libpq++ and RH5.1
Next
From: 8ch5yg
Date:
Subject: ...