realbasic-nug
[Top] [All Lists]

Re: Filtering non-alphanumeric characters

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Filtering non-alphanumeric characters
From: "Theodore H. Smith" <delete at elfdata dot com>
Date: Fri, 30 Dec 2005 00:16:04 +0000
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20051229062942 dot CEACDF9818A at lists dot realsoftware dot com> <93D7F79D-56F8-49B6-A08A-B0717C112AC4 at pluggers dot nl>

On 30 Dec 2005, at 00:07, Rob Laveaux wrote:


On 29-dec-2005, at 7:29, Christian Miller <realbasic at nc dot rr dot com> 
wrote:

Hello.  In an application I'm writing, I need to filter out non-
alphanumeric characters.  Currently I loop through the text in the
editfield and manually filter A-Z, numbers, etc.  This works great
for English.  Can anyone share with me how I can accomplish the same
thing (automagically?) from within RB for non-English languages?

I recently wrote the following function to test whether a username is valid. I accepts most common characters used in European languages. You could modify it to strip anything that does not match the criteria. I do hope that the extended characters are transferred properly in this email.

What about the rest of the world? :D

Really, a half-hearted attempt is worse than no fancy attempt in this case. At least my "> 127" trick covers as much of the globe as Unicode covers.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>