[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sub-problem with regex
From: |
Aharon Robbins |
Subject: |
Re: sub-problem with regex |
Date: |
Fri, 27 Sep 2002 10:56:23 +0300 |
This is a problem with the locale you're using. If you set
export LANG=C
or
export LC_ALL=C
before running gawk, it'll work the way you expect. It's not a gawk bug.
Arnold
> From: Alexander Stohr <address@hidden>
> To: address@hidden
> Date: Thu, 26 Sep 2002 19:13:23 +0200
> Subject: sub-problem with regex
>
> i was doing this for several times:
> sub("[A-Z]*$", "", text);
> but came to the conclusion that it is broken
> since awk version 3.1.1 - i am using a RedHet beta of it.
>
> strings like "something124abc" were converted to "something124"
> which is really not what the above code should do.
>
> luckily i came to the following work around:
> sub("[[:upper:]*$", "", text);
>
> but in fact the awk program itself is now under heavy suspect
> of beeing buggy. if you think you cant reproduce, then i will
> take my time to look after your test cases for verification.
>
> -Alex.
>
> PS: please CC me on answers because i am not a list member.