Re: [HACKERS] regular expressions from hell

Поиск
Список
Период
Сортировка
От dg@illustra.com (David Gould)
Тема Re: [HACKERS] regular expressions from hell
Дата
Msg-id 9806030626.AA00976@hawk.illustra.com
обсуждение исходный текст
Ответ на Re: [HACKERS] regular expressions from hell  (Roland Roberts <roberts@panix.com>)
Список pgsql-hackers
Roland B. Roberts, PhD writes:
> >>>>> "ocie" == ocie  <ocie@paracel.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@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 по дате отправления:

Предыдущее
От: Brett McCormick
Дата:
Сообщение: Re: [HACKERS] keeping track of connections
Следующее
От: dg@illustra.com (David Gould)
Дата:
Сообщение: Re: [HACKERS] keeping track of connections