in reply to One more q: on: parsing file/regex question
in thread parsing file/regex question
You do have the right notion for converting a literal (two character) '\n' or '\t' into the corresponding regex for the given type of whitespace.
Note that some portions of your regexes can be simplified: [a-zA-Z0-9_] is really just "\w", and if you want to match space, newline and tab, you might as well just use "\s".
Are $VALID1 and $VALID2 really supposed to accept periods and asterisks, as well as alphanumerics and whitespace? (Just checking... sometimes people tend to make the mistake of putting ".*" inside of square brackets when they really have something else in mind.)
|
|---|