in reply to Re^2: validate variable-length lines in one regex?
in thread validate variable-length lines in one regex?

Another thought - If it's possible to edit the file I would put the mask as the first line, no need to edit the script then. Failing that put something in the filename that chooses the correct mask for you. This would of course mean editing the file for each new mask.

poj
  • Comment on Re^3: validate variable-length lines in one regex?

Replies are listed 'Best First'.
Re^4: validate variable-length lines in one regex?
by locked_user sundialsvc4 (Abbot) on Jul 07, 2015 at 01:13 UTC

    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().)