[H-GEN] ASCII Characters
Joe Skilton
shnads at 3blokes.mine.nu
Fri Oct 24 10:06:44 EDT 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
----- Original Message -----
From: "Andrew Pullin" <andrew at hotspurbgc.com.au>
> What characters do you want to keep?
Unfortunatly I want to keep the 'valid' (non-ascii) characters, and throw
out the rest.
>It sounds to me that all you want
> is ascii text from an irc and nothing else so what you need is a script
that
> looks at each line, and then for each character in that line you want to
> check it is [a-zA-Z] or [1-9] or some punctuation mark. From memory, those
> characters are all below 127 so an initial match of below 127 or x00FF
> should strip most of the characters away.
A great idea, I could use this in reverse, check for 'valid' characters, and
throw out the rest.
> If you need help, almost any Perl
> tutorial will do as in most cases the first thing you do after "Hello
World"
> is some kind of line count script - which is half of your script already,
> and good tutorials have a few variants that are very close to what you
want.
I already know perl fairly well, and already have the program running
fine(but leaving the pesky ASCII there), but with your suggestion it will
get alot better.
Pulling out the 'valid' data and leaving the rest makes more sense anyway,
as there is no way I can predict exactly what ASCII the program will
encounter.
> Good Luck.
> Andrew.
Thanks Andrew, you'v been very helpful !!
Cheers,
Joe
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list