Subject: Re: cygwin/regex is non-POSIX
From: Sam Steingold <[email-masked]>
To: [email-masked]
Date: Mon, 19 Jan 2004 16:38:40 -0500

> * U-DHX98431\sthoenna <[email-masked]> [2004-01-19 12:13:58 -0800]:
>
> On Mon, Jan 19, 2004 at 01:54:06PM -0500, Sam Steingold <[email-masked]> wrote:
>> > * Yitzchak Scott-Thoennes <[email-masked]> [2004-01-17 21:04:50 -0800]:
> That's cute.  But what if a real address matches a rot13'd one?

rot13({top-level-domain}) does not intersect {top-level-domain}.
I find these "anti-email-address-harvesting efforts" to be hurting the
legitimate users more than they hamper spammers (but let us not start
this here)

>> > Also, it says backrefs part of basic regular expressions but not
>> > exteneded ones.  From your mention of | I assume you are using
>> > REG_EXTENDED.  If REG_EXTENDED|REG_BACKR allows backrefs, it doesn't
>> > appear to be documented.
>> 
>> I am not sure what you mean here.  I would like to interpret your words
>> as follows, so that I can agree with you:
>> <http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap09.html>
>> does not mention REG_BACKR, so it's mere presence can probably be
>> contrued as a violation of the standard (unless it is enabled whenever
>> REG_EXTENDED is).  REG_BACKR is also not mentioned in "man regex", so
>> it is not documented.  Right?
>
> I was saying xbd_chap09 (my local copy, haven't rechecked the online
> one for any changes, but don't expect any) says back references are
> only available if you *don't* say REG_EXTENDED (or at least that's my
> reading of it).  The regex package doc (man 3 regex, man 7 regex) also
> discourage using them even then.

Oops, you appear to be correct - I was caught in the assumption that
ERE cannot offer less functionality than BRE which is supported by
gnulib & glibc implementations of regexp.  sorry.

but _WHY_ do ERE preclude back-references?!

>> Finally, a common extension appears to be the use or "?" after a
>> repetition specification to mean non-greedy matching, e.g.
>> "a+?" will match only the first "a" in "aaaa".
> You want the pcre packages then (pcre and pcre-devel).

no, not really.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
PI seconds is a nanocentury

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/