>>> re.compile("(?P<pfx>(v|))(?P<ver>((\d+[\.\-_]*)+))(?P<sfx>(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P<rev>.*)") >>> regex = re.compile("(?P<pfx>(v|r|))(?P<ver>((\d+[\.\-_]*)+))") > I made a mistake here the case that i say is when have a prefix like, > > >>> import bb > >>> bb.utils.vercmp_string('r2.7+gitX', '2.9+gitX')
But the <pfx> component should take care of any such leading characters, right? So when they are taken out, there is no reason to limit the rest to just numbers. I'll send a patch which changes the regexes to allow "pre", "rc", "final", "stable", or anything else like "1.0.2a". We can't hardcode everything that people can come up with, so it's best to write a generic regex. Alex -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core