• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strip characters without recursive loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Strip characters without recursive loop
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Silly question?
  • Next by Date: Is is possible to use records in a dynamic way?
  • Previous by thread: Re: Strip characters without recursive loop
  • Next by thread: Re: Strip characters without recursive loop
  • Index(es):
    • Date
    • Thread