RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Generalizing EVR comparison precedence, preliminaries

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 02 Jan 2009 - 05:43:14 CET
Message-id: <23D985C8-579F-4B2F-B529-C6B23D3E096D@mac.com>

On Jan 1, 2009, at 8:18 PM, Michael Jennings wrote:

>>
>> But I've never seen nor used RE constructs like
>> 	^(?:......)?....$"
>> ever in my life.
>
> I'm pretty sure RSE gave you a PCRE, not an ERE.  (?:) inhibits the
> assigning of the contents of the parenthesized subgroup to a $123 (or
> \123) variable.  I don't believe ERE has anything similar,
> unfortunately.
>

Actually it was my silly bug, it helps if you take strlen(3) of the  
right string.

And FWIW the original pattern works perfectly as an ERE:

==> xx 0 "1:5.4.2-3.fc10"
        0 [0,14) "1:5.4.2-3.fc10"
        1 [0,1) "1"
        2 [2,7) "5.4.2"
        3 [8,14) "3.fc10"
==> xx 0 "3.0.4-1"
        0 [0,7) "3.0.4-1"
        2 [0,5) "3.0.4"
        3 [6,7) "1"

Live & learn.

73 de Jeff

  • application/pkcs7-signature attachment: smime.p7s
Received on Fri Jan 2 05:43:17 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.