bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] Does regex.c support non-greedy quantifiers?


From: Stepan Kasal
Subject: Re: [bug-gnulib] Does regex.c support non-greedy quantifiers?
Date: Mon, 11 Apr 2005 14:32:38 +0200
User-agent: Mutt/1.4.1i

Hello,

On Mon, Apr 11, 2005 at 12:15:32PM +0200, Hrvoje Niksic wrote:
> Does gnulib's regex.c support Perl-style non-greedy quantifiers,
> specified by appending "?" to "*"?  GNU Emacs 21.4 seems to support
> them, and I understand that gnulib's regex.c comes from Emacs.

yes, the current version of regex.c in gnulib originated from Emacs.

But I think there is consensus that this version should be replaced by the
regex code from GNU C Library (glibc).
That means using files available in
        :pserver:address@hidden:/cvs/glibc
in subdirectory posix.

The advantage of the glibc code is that it handles various locales correctly.
(The code was written from Isamu Hasegawa from IBM Japan.)

I'm afraid that that version doesn't handle non-greedy matching.  I'm not
sure whether the glibc developers would like to see such an enhancement.
It's best to contact them, perhaps via
        http://sourceware.org/bugzilla/

A cheeky question: when you want perl-like features in your regexes,
wouldn't pcre match your needs better?

Have a nice day,
        Stepan Kasal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]