[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gawk match() strange behaviour
From: |
Aharon Robbins |
Subject: |
Re: Gawk match() strange behaviour |
Date: |
Thu, 06 Sep 2007 18:16:55 +0300 |
Hi. Sorry for the delay in replying.
> Date: Wed, 11 Jul 2007 18:44:56 +0200
> From: Alain Ketterlin <address@hidden>
> Subject: Gawk match() strange behaviour
> To: address@hidden
>
> Hi,
>
> The following program:
>
> {
> r = match($0,/^ */,t);
> print "R=" r " S=" RSTART " L=" RLENGTH;
> }
>
> produces this (< signals input, > signals output)
>
> <
> > R=-1208966831 S=-1208966831 L=1208966850
> < random
> > R=1 S=1 L=34
> < random
> > R=1 S=1 L=2
>
> The first line is an empty line, and match returns seemingly random values.
> The second should have a match, but not of length 34. The third is correct.
>
> This is Gnu Awk 3.1.5 on Ubuntu 7.04
>
> -- Alain.
I could not reproduce this using either stock gawk 3.1.5 or the current CVS
sources. I suggest that you try building from scratch from the CVS archive
on savannah.gnu.org.
For the empty line I get
R=1 S=1 L=0
If building from scratch still causes a failure, please let me know.
Otherwise, please report it to the Ubuntu people.
Thanks,
Arnold
- Re: Gawk match() strange behaviour,
Aharon Robbins <=