in reply to Question regarding a regex
Depending on your definition of 'text file', this test could give a false negative if the file contained any non-ASCII 'text'. It could give a false positive if every byte of a 'binary' file happened to contain the code of an ASCII character. (Can you tolerate an extremely rare error?)
Bill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Question regarding a regex
by afoken (Chancellor) on Jul 23, 2021 at 08:09 UTC | |
by BillKSmith (Monsignor) on Jul 23, 2021 at 13:55 UTC | |
by bliako (Monsignor) on Jul 23, 2021 at 08:51 UTC |
In Section
Seekers of Perl Wisdom