Re: strings, again and again
Re: strings, again and again
- Subject: Re: strings, again and again
- From: Kurt Klamp <email@hidden>
- Date: Mon, 4 Feb 2008 23:27:16 +0100
Am 04.02.2008 um 22:02 schrieb Justin Laden:
repeat with i from 2 to (z)
why starting with 2?
copy {""} to end of jobNumRange
what is this for?
try
set firstPull to (find text "^[a-zA-Z][0-9]{4}" in item i of
descriptionRange with regexp)
set list i of jobNumRange to matchResult of firstPull
what is 'list i' ? Do you mean 'item i' ?
if yes (and if you use 'item i') this sets the content of item i as
a string --> "match result"
on error
set item i of jobNumRange to {""}
this sets the contents of item i to a list
end try
end repeat
copy the value of range ("I1:I" & z) to jobNumRange
This i understand at all. In the loop you build the jobnumrange
variable as a result list and here you overwrites the found results?
No matter what, it doesn't work in EXCEL--give it a shot!
The problem seems to be that I can't get the new populated list to be
copied into an Excel column. This could be because the list is NOT a
list of lists, but a list of strings and lists... Not sure how to get
the regular expressions to be returned as lists.
Also, it seems to add lists in between the results, like so:
"D1198", {""}, "D1243", {""}, "D1251", {""}, "D1285", {""}, "D1352",
{""}, {""}, {""}
No wonder, see above. You mix setting the result list's items as
string or as list.
Kurt
_______________________________________________
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