Subject: Re: awk problem with `{n[,[m]]}' repetition operator
To: None <netbsd-users@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: netbsd-users
Date: 08/08/2005 17:35:37
In article <20050808153120.GA24604@grouper.salmi.ch>,
Jukka Salmi  <j+nbsd@2005.salmi.ch> wrote:
>Hi,
>
>on both -current (awk version 20050424) and 2.0_STABLE (awk version
>20030729) I see the following:
>
>	$ echo '123' | awk '/^[0-9]{3}$/{print;}'
>	$ echo '123' | awk '/^[0-9]{1,}$/{print;}'
>	$ echo '123' | awk '/^[0-9]{1,3}$/{print;}'
>
>I expect `123' to be printed. BTW, `*' and `+' work fine:
>
>	$ echo '123' | awk '/^[0-9]+$/{print;}'
>	123
>	$ echo '123' | awk '/^[0-9]*$/{print;}'
>	123
>
>Is this a bug, or am I missing something?

gawk seems to be behaving the same way.

christos