Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] regular expressions from hell

From: dg(at)illustra(dot)com (David Gould)
To: roberts(at)panix(dot)com
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] regular expressions from hell
Date: 1998-06-03 06:26:06
Message-ID: 9806030626.AA00976@hawk.illustra.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Roland B. Roberts, PhD writes:
> >>>>> "ocie" == ocie  <ocie(at)paracel(dot)com> writes:
> 
>     ocie> I think most of this is due to different decisions on what
>     ocie> needs to be escaped or not.  For instance, if memory serves,
>     ocie> GNU grep treats parens as metacharacters, which must be
>     ocie> escaped with a backslash to match parens, while in Emacs,
>     ocie> parens match parens and must be escaped to get their
>     ocie> meta-character meaning.  Things have gone too far to have
>     ocie> one standard now I'm afraid.
> 
> Please try to remember that there are historical reasons for some of
> this.  grep and egrep behave differently with respect to parentheses;
> again, this is historical. 
> 
> Personally, I like Perl regexps.  And there is a library for Tcl/Tk
> (nre) that implements the same syntax for that language.  But I do
> like Emacs' syntax tables and character classes.  I can live with
> switching back and forth to some extent....

Emacs! Huh! I like VI regexes... Uh oh, sorry, wrong flamewar.

Isn't there a POSIX regex? Perhaps we could consider that, unless of course
it is well and truly broken.

Secondly, I seem to remember a post here in this same thread that said
we already had regexes. Perhaps we should move on.

Seriously as part of a Perl extension to postgresql, perl regexes would 
be the naturaly thing. But if we already have a regex package, I think
adding just perl regexes without perl, but requireing perl.so is uhmmm,
premature.

-dg

David Gould            dg(at)illustra(dot)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

In response to

pgsql-hackers by date

Next:From: David GouldDate: 1998-06-03 08:05:17
Subject: Re: [HACKERS] keeping track of connections
Previous:From: Brett McCormickDate: 1998-06-03 06:19:03
Subject: Re: [HACKERS] keeping track of connections

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group