Re: A Lookup Function?
Re: A Lookup Function?
- Subject: Re: A Lookup Function?
- From: Christopher Stone <email@hidden>
- Date: Mon, 24 Jan 2011 16:05:27 -0600
Hey Folks,
A minor modification in this handler to escape the '.' and appease the regular _expression_ Gods.
on phoneticLookup(someStringToLookup) set transList to {} set splitIt to characters of someStringToLookup repeat with i from 1 to length of splitIt set lookUpChar to item i of splitIt set lookUpChar to change {"."} into {"\\."} in lookUpChar set lookUpCharRegex to "^" & lookUpChar & "\\t+(.+)" set end of transList to regexFindCapture (lookUpCharRegex , "\\1", lookUpTable , false, true, false, false, true) of me end repeat return transList end phoneticLookup
|
_______________________________________________
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