From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8f802583e5c84fa,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed.pacific.net.au!nasal.pacific.net.au!not-for-mail Newsgroups: comp.lang.ada Subject: String filtering From: David Trudgett Organization: Very little? Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:hQuEwkVPvpDeqHO0Y5sN9xVQcIs= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 27 Sep 2005 16:27:08 +1000 NNTP-Posting-Host: 61.8.35.42 X-Complaints-To: news@pacific.net.au X-Trace: nasal.pacific.net.au 1127802705 61.8.35.42 (Tue, 27 Sep 2005 16:31:45 EST) NNTP-Posting-Date: Tue, 27 Sep 2005 16:31:45 EST Xref: g2news1.google.com comp.lang.ada:5174 Date: 2005-09-27T16:27:08+10:00 List-Id: Hi all, I've been puzzling for a little bit over a good way to filter out unwanted characters from a string. In particular, I have an unbounded string and want to filter out of it all characters not in 'a'..'z', 'A'..'Z', '0'..'9'. So far I've only thought of tedious ways to do it. Is there an easy way to do it using the string handling facilities in Ada? I think I almost got there with the idea of using Maps.Character_Set, and so on, but I haven't quite pieced it together yet. Thanks. David -- David Trudgett http://www.zeta.org.au/~wpower/ We must learn to live together as brothers or perish together as fools. -- Martin Luther King, Jr.