Re: Creating a list
Re: Creating a list
- Subject: Re: Creating a list
- From: Christopher Stone <email@hidden>
- Date: Sun, 30 Aug 2009 10:11:13 -0500
On Aug 29, 2009, at 16:36, Peter Baxter wrote: I'm trying to create a list from a text file of every word in it that has 5 characters. This shouldn't be so hard, but I keep failing in the task. Can anyone help?
______________________________________________________________________
Hey Peter,
Personally I'd use the Satimage osax and regular expressions:
set n to "Now is the time for all good men to come to the aid of their country."
set findData to n set findString to "\\b[a-z]{3}\\b"
set theResult to ¬ find text findString ¬ in findData ¬ case sensitive false ¬ regexp true ¬ all occurrences true ¬ with string result The example finds 3-letter words. Change '{3}' to '{5}' in the example for 5-letter words.
Chris |
_______________________________________________
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