Re: String parsing - help!
Re: String parsing - help!
- Subject: Re: String parsing - help!
- From: Emmanuel <email@hidden>
- Date: Thu, 21 Nov 2002 22:36:08 +0100
At 11:51 AM -0800 21/11/02, Lui wrote:
There must be an easier way to do the following
parsing...
I have an incoming string '-Name John Smith -Address
123 Home Ave -City San Diego -State California -Zip
92101'
I am trying to capture the values into the
cooresponding fields in FileMaker cells.
Looks like a job for the Regular Expressions:
---------------------------
set s to "-Name John Smith -Address 123 Home Ave -City San Diego
-State California -Zip 92101"
matchResult of (find text "-Name (.*) -Address (.*) -City (.*) -State
(.*) -Zip (.*)" in s using {"\\1", "\\2", "\\3", "\\4", "\\5"} with
regexp)
--> {"John Smith", "123 Home Ave", "San Diego", "California", "92101"}
---------------------------
(using "find text" from the Satimage osax)
I don't know FileMaker well, but I hope you can make something with the list.
Emmanuel
<netiquette> from Satimage-software, the author of the Satimage osax
</netiquette>
_______________________________________________
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.