• 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: John Delacour <email@hidden>
  • Date: Tue, 19 Aug 2003 09:52:59 +0100

At 11:52 am +1000 19/8/03, Duncan Cowan wrote:

Example:

set theString to "1234-56abc"
set theResult to characters of the string whose kind is integer

A perfect example of why NEVER to use "the..." at the beginning of a variable name.


Here's another shell solution

set s to "1234-56abc"
do shell script "perl -e '
$_= q~" & s & "~ ; s~[^\\d]~~g ; print '"

JD




.
_______________________________________________
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>
References: 
 >Strip characters without recursive loop (From: Duncan Cowan <email@hidden>)

  • Prev by Date: Re: Weird Finder bug - or not?
  • Next by Date: Re: Strip characters without recursive loop
  • Previous by thread: Re: Strip characters without recursive loop
  • Next by thread: Re: Strip characters without recursive loop
  • Index(es):
    • Date
    • Thread