Peter Hansen wrote: > could ildg wrote: > >> I need a regular expression to check if a string matches it. > > > Why do you think you need a regular expression? > > If another approach that involved no regular expressions worked much > better, would you reject it for some reason? > > -Peter
A regular expression will work fine for his problem. Just match the digits separated by underscores using a regular expression, then afterward check if the values are valid. -- http://mail.python.org/mailman/listinfo/python-list