• 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: Emmanuel <email@hidden>
  • Date: Tue, 19 Aug 2003 16:13:30 +0200

At 10:20 AM +0200 19/08/03, Jean-Baptiste LE STANG wrote:
>Using satimage osax, you can do :
>
>change "[^(1-9)]" into "" in "aze213aze456" with regexp
>--> "213456"
>@+ JB

(probably you would choose to include "0" as well)

Emmanuel

>>On Tuesday, August 19, 2003, at 01:52 PM, Duncan Cowan wrote:
>>>Is it possible to string all non numerical characters from a string, without
>>>looping through each character?
>>>I realise that this is probably not possible.... but it would make my script
>>>run a lot quicker.
>>>Example:
>>>set theString to "1234-56abc"
>>>set theResult to characters of the string whose kind is integer
>>>
>>
>>well, I don't know if it's faster than your particular loop but
>>
>>set theString to "1234-56abc"
>>set theStringVersion2 to quoted form of theString
>>set shellstring to "echo " & theStringVersion2 & " |sed 's/[^0123456789]//g'"
>>set theResult to do shell script shellstring
>>
>>seems to work,
>>
>>
>>David Hood
>>_______________________________________________
>>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.
>_______________________________________________
>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.
_______________________________________________
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.

References: 
 >Re: Strip characters without recursive loop (From: Jean-Baptiste LE STANG <email@hidden>)

  • Prev by Date: Re: Mixing Apple Script, Excel and a network
  • Next by Date: Re: Memory and idle applescript
  • Previous by thread: Re: Strip characters without recursive loop
  • Next by thread: Re: Strip characters without recursive loop
  • Index(es):
    • Date
    • Thread