Re: Strip characters without recursive loop
Re: Strip characters without recursive loop
- Subject: Re: Strip characters without recursive loop
- From: julifos <email@hidden>
- Date: Wed, 20 Aug 2003 10:07:13 +0200
Thought this would also fall into the topic's scope, though this probably
isn't as fastest as plain vanilla:
#####################################
set x to "sdfk47fd-73fl"
{x, extractNums(x), delNums(x)}
--> {"sdfk47fd-73fl", "4773", "sdfkfd-fl"}
to extractNums(x)
do shell script "printf " & quoted form of x & " | tr -cd '[0-9]'"
end extractNums
to delNums(x)
do shell script "printf " & quoted form of x & " | tr -d '[0-9]'"
end delNums
#####################################
jj
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.