RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Is there an implementation for PCRE <-> POSIX interconversion?

From: Jeff Johnson <n3npq@mac.com>
Date: Sat 19 Apr 2008 - 02:37:13 CEST
Message-Id: <F7934C63-BFFF-4499-98CA-0667C0479BDF@mac.com>

On Apr 18, 2008, at 8:09 PM, Wichmann, Mats D wrote:

> Jeff Johnson wrote:
>> I know that PCRE and POSIX are functionally equivalent.
>>
>> But can the interconversion between PCRE <-> POSIX regexes be
>> automated?
>>
>> I'd love a general "have it your own way" RE interconversion
>> rather than have to choose either PCRE or POSIX regex dialect.
>>
>> rpm got enuf Chauvinism problems in the packaging wars already
>> without adopting Yet Another War.
>
> Hey speaking of wars, let's provide another excuse to
> put PCRE into LSB :-)  (I've already been thinking
> about that, FWIW)

If you want, rpmgrep (which is based on pcregrep, I ain;t
done nothing to wonderful BSD code and have no reason to
not give credit where it is due) uses a mire pattern abstraction.

What that means is that its possible to have PCRE and POSIX regex's
side by side in a fully featured grep.

And yes I'm quite sure that there are other attempts to use both PCRE  
and POSIX regexes,
it ain't exactly rocket science,  done before I'm sure. All I cared
was to get some reasonble "make check" while trying to create
a pattern matching abstraction API, pcregrep was the path of least  
effort.

Code is yours for the asking, I got enuf problems with RPM devel  
already ...

(aside) Next in the hopper is bsdtar/bsdcpio (and libarchive). Very  
nice, very sweet code, way better
than GNU tar/cpio imho. YMMV.

And there's always star if you're brave, also definitely better code  
than GNU tar. Serious
discussions about switching to star at a former employer where I  
maintained "archivers"
and "compressor" category packages.

But I suspect you are gesting ...

73 de Jeff
Received on Sat Apr 19 02:37:35 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.