The Opposite of re match
mgerrans at mindspring.com
Thu Aug 22 17:41:15 CEST 2002
> I don't know the exact answer to your question. But are there no general
> patterns to the formats? You could perhaps run some basic checks that
> help to narrow it down, for example to see if just the extension matches
> or the length matches, or match certain parts in isolation. That way,
> you know the general format is ok but the specifics are not. The format
> for the above example is quite clearly in 4 parts - 3 letters, an
> underscore, 3 numbers, and an extension, so you could get an accurate
> answer with just 4 patterns, I think. Maybe not the answer you wanted,
> but better than nothing...
> Ben Sizer
Yes, that is the general idea I am persuing, but unfortunately the example I
presented here is a lot simpler than the real problem!
More information about the Python-list