in reply to Re^3: validate variable-length lines in one regex?
in thread validate variable-length lines in one regex?
Hmmm.... Not sure that I would trust the preparer of such files that much. Nor would I, personally, want to so much as touch the data. However, you might have some kind of catalog or configuration-file, external to the script, which provides the necessary information. (And, if the script could not locate exactly-one appropriate entry, for whatever file that it has been given, it would obligingly die().)