Re: String to list
Re: String to list
- Subject: Re: String to list
- From: Simon Forster <email@hidden>
- Date: Fri, 11 Sep 2009 15:01:44 +0100
On 11 Sep 2009, at 14:56, Simon Forster wrote:
On 11 Sep 2009, at 14:52, Simon Forster wrote:
Forgive me. Been away too long. I have a literal string
"{\"340809\",\"83.223.119.12\"},{\"327613\",\"217.109.108.5\"}"
which I'd like my script to interpret as a list. How do I do this?
IIRC, script objects come into play but my memory's a bit rusty.
Apologies for the noise. Run script was what I was after
And (all one line):
set dataIn to run script (do shell script "perl -p -e 's/^ *([^ ]+) *
([^ ]+)[^ ][\\n\\r]+/\"$1\",\"$2\"},{/g' /Users/simonforster/WIP/
Spamhaus/interesting_ip/tmp.txt | perl -p -e 's/^(.*),{$/{{$1}/'")
gets me what I want.
I'll shut up now.
Simon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden