how to delete ponctuation in a textfield
Lynch, Jonathan
bnz2 at cdc.gov
Thu Jan 19 14:43:22 EST 2006
You are going to get a million different approaches to how to do this...
Do you wish to exclude certain particular bits of punctuation, or do you
wish to include only characters that are letters and numbers?
Here is a function for the inclusion approach:
Function NumCharOnly pText
Repeat for each char tChar in pText
If tChar is in "abcdefghijklmnopqrstuvwxyz1234567890" then
Put tChar after tReturnText
End if
End repeat
Return tReturnText
End NumCharOnly
Here is a function for the exclusion approach:
Function ExcludePunct pText
Repeat for each char tChar in pText
If tChar is not in "~!@#$%^&*()><.,`?/{}[]|\=-_" and tChar <> quote
then
Put tChar after tReturnText
End if
End repeat
Return tReturnText
End ExcludePunct
-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Christian
Langers
Sent: Thursday, January 19, 2006 2:27 PM
To: use-revolution use Revolution
Subject: how to delete ponctuation in a textfield
Does anybody know how to remove any ponctuation from text ?
any regex filtering ?
Thanks in advance,
Christian
Luxembourg
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list