2014-01-29 Ender Nafi Elekcioglu <[email protected]>:

> The statement should clear all whitespaces and non-ascii chars except dash 
> and space.
>
> ~ Ender


[ ...]  -> character class; match any characters in between the brackets
[^...] -> character class; do *NOT* match all characters in between the brackets

So, you can try something like:

put replacetext( mytext, "[^a-zA-Z0-9]", empty) into mytext

a-z  -> any chars from a to z
A-Z  -> any chars from A to Z

Still missing the dash; add it inside the brackets:

put replacetext( mytext, "[^a-zA-Z0-9-]", empty) into mytext

and carry on adding extra chars until you are happy.

Does that makes sense?


Thierry

------------------------------------------------
Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage - sunnYpdf

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to