Subject: awk problem with `{n[,[m]]}' repetition operator
To: None <netbsd-users@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: netbsd-users
Date: 08/08/2005 17:31:20
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?


TIA,

Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~