On 2008/02/17 06:59, Aleksey Cheusov wrote:
On Sun, Feb 17, 2008 at 12:44:57AM +0200, Aleksey Cheusov wrote:>> An easiest missed thing is a regular expression for correct package >> version. Is the following correct (ERE)?>> >> [0-9]+([.][0-9]+)*((alpha|beta|rc|pre|pl)[0-9]+)?[a-z]?(nb[0-9]+)?This is only a subset of the allowed syntax. You can have multiple alpha,rc,pl,... parts for example.Ok. Next try: [0-9]+(([.]|alpha|beta|rc|pre|pl)[0-9]+)*[a-z]?(nb[0-9]+)? Can [a-z] be also repeated?
An observation: that last part will match nb0 (which doesn't/can't occur AFAIK). Maybe
(nb[1-9]([0-9]+)?)? for that last piece.