Re: [PHP] eregi() against a binary file?

2002-05-29 Thread Miguel Cruz
According to the manual, the ereg functions are not binary safe. The superior-in-every-way preg functions are. Perhaps you could try using preg_grep instead. $result = preg_grep('/' . preg_quote($imagename) . '/', $file); You may find that strstr or something is even simpler. miguel On Tue,

[PHP] eregi() against a binary file?

2002-05-28 Thread Kevin Stone
I'm trying to match file names associated with a 3DS file (a 3DS file is a common 3D file format). The file is binary by nature but as you can clearly see in the dump below the filenames themselves are stored as plain text. So I should be able to do a simple eregi() on the file and discover if