Email List: Xaustin-group-lX
[All Lists]

Re: XBD ERN 7 -- regcomp and sed

To: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Re: XBD ERN 7 -- regcomp and sed
From: Geoff Clare <yyy@xxxxxxxxxxxxx>
Date: Fri, 21 May 2004 17:54:57 +0100
References: <200405211302.JAA20509@raptor.research.att.com> <20040521143028.GA20239@squonk> <40AE2F7F.C268C46E@veritas.com>
Bruce Korb <yyyyy@xxxxxxxxxxx> wrote, on 21 May 2004:
>
> > A better example would be the string "ababa" with the same BRE, but
> > it's all basically the same issue.
> 
> Using:
> >        printf("<%s|%s> (%3d -> %3d) (%3d -> %3d)\n", strs[1], strs[2],
> >               match[1].rm_so, match[1].rm_eo, match[2].rm_so, 
>match[2].rm_eo);

> > $ echo ababa | ./re
> > <a|b> (  2 ->   3) (  1 ->   2)

I suspect this was still using the string "aba" that was hardcoded
in Nick's test program, rather than the string provided on stdin.

If you change the string to "ababa" you should get (4 -> 5) (3 -> 4)
as the matches.

-- 
Geoff Clare <yyyyyyy@xxxxxxxxxxxxx>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

<Prev in Thread] Current Thread [Next in Thread>