[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mercurial in OS 10.4.11 (was imread/imwrite)
From: |
John W. Eaton |
Subject: |
Re: mercurial in OS 10.4.11 (was imread/imwrite) |
Date: |
Mon, 23 Jun 2008 11:52:48 -0400 |
On 20-Jun-2008, Jaroslav Hajek wrote:
| On Fri, Jun 20, 2008 at 10:28 PM, John W. Eaton <address@hidden> wrote:
|
| > The AWK book only documents a two-argument version of match, but notes
| > that it sets RSTART and RLENGTH. I see that mawk fails for this:
| >
| > echo "foo bar baz" | mawk '{match ($0, /^foo ([^ ]*)/, res); print res[1];
}'
| > mawk: line 1: syntax error at or near ,
| >
| > The following doesn't fail, but it doesn't really do the right thing
| > either:
| >
| > echo "foo bar baz" | gawk '{match ($0, /^foo ([^ ]*)/); print RSTART,
RLENGTH; }'
| > 1 7
| >
| > Note RSTART and RLENGTH cover the entire regexp, not just the part in
| > parens. So I guess something else is needed if you want this to be
| > portable.
| >
| > jwe
| >
|
| Okay, so what about the following? It's the "good old way", using only
| index and substr.
| This should definitely be POSIX compatible...
I checked it in.
Thanks,
jwe
- imread/imwrite, Thomas L. Scofield, 2008/06/19
- Re: imread/imwrite, Julian Schnidder, 2008/06/19
- mercurial in OS 10.4.11 (was imread/imwrite), Thomas L. Scofield, 2008/06/19
- Re: mercurial in OS 10.4.11 (was imread/imwrite), David Bateman, 2008/06/20
- Re: mercurial in OS 10.4.11 (was imread/imwrite), Jaroslav Hajek, 2008/06/20
- Re: mercurial in OS 10.4.11 (was imread/imwrite), John W. Eaton, 2008/06/20
- Re: mercurial in OS 10.4.11 (was imread/imwrite), Jaroslav Hajek, 2008/06/20
- Re: mercurial in OS 10.4.11 (was imread/imwrite), dbateman, 2008/06/20
- Re: mercurial in OS 10.4.11 (was imread/imwrite), Jaroslav Hajek, 2008/06/21
- Re: mercurial in OS 10.4.11 (was imread/imwrite),
John W. Eaton <=
Re: imread/imwrite, Ben Abbott, 2008/06/20
imread/imwrite, John W. Eaton, 2008/06/20