Re: Strip characters without recursive loop
Re: Strip characters without recursive loop
- Subject: Re: Strip characters without recursive loop
- From: John Delacour <email@hidden>
- Date: Wed, 20 Aug 2003 20:31:39 +0100
At 3:01 pm +0200 20/8/03, Emmanuel wrote:
>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.
No. Almost certainly your 31,000 characters contained at least one '
and that would break it, for obvious reasons if you look at it. This
direct approach can only be used if there are no ' in the string. A
file has to be used otherwise, as I've meantioned a couple of times
fairly recently.
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.