Using regular expression substitution on binary data
jeremyh
created: 2006-03-03 13:04:38
The quote below from www.perl.com makes me think this is okay.

"Although optimized for scanning text, Perl can also deal with binary data..."

I am filtering the output of an app that generates text followed by PDF by using a regular expression substition that gets rid of the text. (The "app" is actually several components piped together - it is convenient to just let the text output stay as long as I can remove it at the end). This seems to work, but wondered if there might problems that I just haven't run into yet.

Re: Using regular expression substitution on binary data
created: 2006-03-03 13:23:18

Your question is too vague to give a sensical answer. But if you all you’re wondering about is whether using regular expressions on binary data may cause problems, then no, it won’t. You might want to say use bytes and use the associated functions, possibly, but there’s nothing inherently problematic about it.

Makeshifts last the longest.

perlmonks.org content © perlmonks.org and Aristotle, jeremyh

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03