HP3000-L Archives

July 1996, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Fri, 5 Jul 1996 10:14:26 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
Can't help you with Query (yet), but if you can copy stuff to a flat file
the following perl script will find any control characters in the file (I
had to do this to find some "line noise" in some student address fields we
sent in to an enrollment clearinghouse).  Redirect stdin to your file:
 
#!/usr/local/bin/perl
while ($line = <STDIN>) {
   chop ($line);
   if ($line !~ /^[\x20-\xfe]*$/) {
      print ("Line $.: $line\n");
   }
}
 
This will find any control chars < 0x20 or delete chars(0xFF) while allowing
for national characters.  To restrict to 7-bit ASCII change the '\xfe' above
to '\x7e'.
 
Of course it would be nice if Query invoked one of the Posix regexp (regular
expression) functions in lieu of the "pattern matching" function shared
between VPLUS and Query.  These "regular expressions" are a superset (or a
super-duper-set) of the current pattern matching code.
 
Jeff Kell <[log in to unmask]>

ATOM RSS1 RSS2