Subject: Quick RegExp question
To: #List NetBSD current users <current-users@NetBSD.ORG>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 04/21/2003 13:29:53
It the following correct:

	pc1:paul {201} cat xxx
	704:1
	704:2
	704:3
	pc1:paul {202} grep '^704:\(2\)\{0,0\}$' xxx
	704:2
	pc1:paul {203}

I would expect the regular expression to say "match anything that
starts with '704:' followed by exactly zero occurrences of '2',
followed by end-of-line.  Instead, it seems to be treating the {0,0}
as though it were {1,1}.

There's no restriction in the re_format(7) man page that says the
bounds cannot be {0,0}.


----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | 9DC5 05CF 1AE7 DC42 CCC6 |  paul@whooppee.com   |
|  & World Cruiser | 6858 051E 7AD2 A6B2 4954 | pgoyette@juniper.net |
----------------------------------------------------------------------