From: <ke...@cr...> - 2006-02-27 15:23:39
|
Andreas Kupries: > ([[:alpha:]_][:[:alnum:]_]*)-([[:digit:]].*)\.tm Oughtn't that be ([[:alpha:]_][[:alnum:]]*)-([[:digit:].]*)[.]tm The one you stated has two bugs, as far as I can tell: (1) I don't think you intended to allow colons in the module name, but that's what your regexp does. (2) Similarly, I don't think you meant the version string to be a digit followed by arbitrary characters. In fact, even [[:digit:].]* is overly permissive; I'd be inclined to restrict it to ([[:digit:]]+(?:[.][[:digit:]]+)*) don...@ma... said: > You want to allow _ as the first character of a package name? That > seems overly permissive of uglyness. (I've no problems with having it > in the rest of the name). We currently allow it as the first character of a variable name, and I'd be inclined toward as much consistency as we can manage. (Moreover, I've found $_ to be useful a time or two - most recently, as the name of a variable that holds the list of semantic values being passed to the user-supplied reduction code in a parser generator.) But it's not a big deal; if you want to forbid leading underscores, I can accept that too. -- 73 de ke9tv/2, Kevin KENNY GE Corporate Research & Development ke...@cr... P. O. Box 8, Bldg. K-1, Rm. 5B36A Schenectady, New York 12301-0008 USA |