Date: Thu, 29 Dec 2005 05:11:57 -0500
Reply-To: Dirk VK <dirk.vk@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dirk VK <dirk.vk@GMAIL.COM>
Subject: An only numbers string. Alpha's out! Symbols out! The horror...
;-)
Content-Type: text/plain; charset=ISO-8859-1
Hello,
I have a character variable, named nace_cd, that should contain only the
numbers 0 to 9.
I used to do this:
compress(nace_cd,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.- ')
And it always worked, but now I encounter Polish data that has things
like: "".
I also realize that for a lot of other languages accents and things like
that might occur, and it could be tedious to keep extending my compress
line with extra characters like 'é','à','ñ', etc.
Also my compress-line has been asuming that only letters and the
symbols '.' and '-' can occur. This assumes rather tidy data, no? Symbols
like '&', '(', ')', etc. might also occur.
This all would extend my compress line way too much.
Goh, and whet if "'" or '"' occur !?
Anybody any ideas on this?
Greetz & all the luck in 2006 with or without spic-and-span data!
|