Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: Question regarding a regex

by afoken (Canon)
on Jul 23, 2021 at 08:09 UTC ( #11135335=note: print w/replies, xml ) Need Help??

in reply to Re: Question regarding a regex
in thread Question regarding a regex

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?)

I know only one binary file that intentionally contains only ASCII characters: The EICAR test file. Here it is, in its full glory:


It is a DOS executable that just prints the embedded text "EICAR-STANDARD-ANTIVIRUS-TEST-FILE!" and then exits.


Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^3: Question regarding a regex
by BillKSmith (Monsignor) on Jul 23, 2021 at 13:55 UTC
    Clever. I was thinking of a binary data file (Perhaps a sequence of readings from a 7-bit A/D converter).
Re^3: Question regarding a regex
by bliako (Monsignor) on Jul 23, 2021 at 08:51 UTC

    impressive! and another form of golf is born.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135335]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-05-29 03:33 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (101 votes). Check out past polls.