Re: Strip characters without recursive loop
Re: Strip characters without recursive loop
- Subject: Re: Strip characters without recursive loop
- From: Emmanuel <email@hidden>
- Date: Wed, 20 Aug 2003 15:01:59 +0200
At 9:52 AM +0100 19/08/03, John Delacour wrote:
>
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 '"
This makes an error on my machine (I am testing with a piece of text of 31,000 characters). Maybe the list server changed some characters. If such is the case could you please resend, for instance in hexa (select then cmd-shift-J in Smile). (To convert back to text select then cmd-shift-G in Smile, which supports carriage returns and spaces).
TIA,
Emmanuel
_______________________________________________
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.