octave-maintainers
[Top][All Lists]
Advanced

[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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]