edit challenge - get rid of unprintables
Kenneth Brody
kenbrody at bestweb.net
Tue Aug 28 15:28:05 PDT 2007
Quoting Joe Chasan (Tue, 28 Aug 2007 17:49:26 -0400):
> am looking for an edit solution to strip out unprintables (e.g. tab, null,
> newline, and carriage return for the most part) from a data field.
>
> pretty much whatever is not included in CHR or ASCII edits.
>
> i'm sure mid can handle character by character, but an easier, one-step
> edit solution is escaping me right now.
>
> ideas?
I don't believe an edit can do this. For example, you cannot imbed a
newline inside the edit, so there is no way to say "delete a newline".
However, you can use XLATE() to poof them out of existence. Store a
list of the "unprintables" in a variable, and xlate() them to nothing.
newvalue = xlate(oldvalue,ListOfUnprintables,"")
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list