bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

failure on [a-z] regex at gawk


From: Rodrigo Hjort
Subject: failure on [a-z] regex at gawk
Date: Fri, 27 May 2005 17:26:01 -0300

Dear GAWK developers,

The regular expression based on alphacharacters intervals seems to
have a problem, as explained below.

***************************************************************************

This machine runs a Slackware with GAWK 3.1.1, and the script worked perfectly.

address@hidden:~$ uname -a
Linux hellgate 2.4.29 #1 Mon Mar 7 16:50:43 GMT+3 2005 i686 unknown

address@hidden:~$ gawk --version
GNU Awk 3.1.1
Copyright (C) 1989, 1991-2002 Free Software Foundation.

address@hidden:~$ echo "nameNAME" | awk '{ print gensub(/[a-z]+/, ".", $0) }'
.NAME

***************************************************************************

This other station runs a Debian with GAWK 3.1.4, but the same script
applied previously doesn't perform the same results.

address@hidden:~$ uname -a
Linux asgard 2.6.10-1-k7 #1 Fri Mar 11 03:13:32 EST 2005 i686 GNU/Linux

address@hidden:~$ gawk --version
GNU Awk 3.1.4
Copyright (C) 1989, 1991-2003 Free Software Foundation.

address@hidden:~$ echo "nameNAME" | awk '{ print gensub(/[a-z]+/, ".", $0) }'
.

If one changes "[a-z]" by the whole "[abcdefghijklmnopqrstuvyxwz]"
sequence, it works.

address@hidden:~$ echo "nameNAME" | awk '{ print
gensub(/[abcdefghijklmnopqrstuvyxwz]+/, ".", $0) }'
.NAME

***************************************************************************

I'm sorry if this was already reported and or corrected.

Best Regards,

Rodrigo Hjort

address@hidden
http://rhjort.cjb.net/

Linux User #348191 (http://counter.li.org)

"Il y a 10 genres de personnes : ceux qui comprennent des nombres
binaires et ceux qui pas."




reply via email to

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