Someone out there may have a better answer, but this one seems tougher than
average because the character you're seeing is a valid, printable text
character.  I suppose one way to go would be to create a character class
with all of the characters that you want to allow.  Something like the
following:

[a-zA-Z0-9_-=()\[\]\\\/'";:><?.,!@#$%\^&*+]    (You might have to fiddle
with the escapes a little)

and then you could do a tr/// or s/// to filter them out.

-----Original Message-----
From: Tim Booher [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 5:37 AM
To: [EMAIL PROTECTED]
Subject: use perl to trim out non text characters from a file


Hello – this should be really simple to the learned perl programmer, but
I am trying to create a simple script to trim all the ‘junk’ out of my
email files. I get a lot of suspicious emails in outlook and normally
drag them to the desktop and open with notepad. This works, but most of
the message is the following:
ź˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
 
Does anyone know what regex could I use to only select all text and trim
all the ‘junk’ from the msg file? Also, does there exist a script
already to do this that you know of?
 
Thanks,
 
Tim
 
 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to