Regex Question

J

JEB

I am trying to use Perl to rescue some legacy word processor files.
The files are ascii, except that some control codes use
bytes in the $80-$ff ranges. I slurp the file into a string for editing.

Regex can hand the bytes <\x7f, but fails to recognize bytes that are \x80
or above.

e.g.,

/\x03//; works
/\x81//; doesn't

Since I thought the problem might be related the adoption of unicode, I've
tried various things like;

no encoding;
use bytes;
and various forms of encoding;
etc.

Nothing helps.

I'm using Perl 5.8+(whatever the lastest revision is) with Redhat Linux
8.0.

Is this something a Perl regex just can't handle?

JEB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,405
Messages
2,571,545
Members
48,797
Latest member
Fractal_Prime_357
Top