in reply to Re: How to validate a directory string?
in thread How to validate a directory string?
I'd be more inclined to something like
Of course, that still doesn't address the question of bytes outside the 7-bit ascii range, which includes the whole domain of utf8 wide characters. For that part of the issue, there isn't enough information in the OP to provide a basis for appropriate advice. (Would utf8 file names be allowable/sensible? What is expectable/possible regarding non-ascii content in the input strings?)/\A[^\x00-\x1f\x7f&*?|\\"'`<>{}()[\]]+\z/ # allows space and "safe" punctuation
|
|---|