dbTalk Databases Forums  

Head scratcher for a empty head.....FM8

comp.databases.filemaker comp.databases.filemaker


Discuss Head scratcher for a empty head.....FM8 in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Head scratcher for a empty head.....FM8 - 04-02-2007 , 02:25 PM






The last word is the zipcode, the second to last word is the state. So
something like this:

Zip = middlewords (CSZ; wordcount( CSZ); 1)
State = middlewords (CSZ; wordcount( CSZ) - 1; 1)
City = middlewords (CSZ; 1; wordcount( CSZ) - 2)


Renfer wrote:
Quote:
Ok guys,

Rookie filemaker guy here. I have what seems to be simple problem but
I can't get it solved.

I need to parse some text and it seems like it should be easy.

text is: (as an example)

Miami Beach FL 33139

I need to extract the city and remove the two letter state code and
the zip.

I use the filter function to removed the zip.

I'm left with: Miami Beach FL

I know I can use rightwords,1 to get FL (or the two letter state code)

But how do get to the point where I"m left with Miami Beach. (some
cities may be one, two or three words).

How can I just extract the two letter state code?

Any ideas would be appreciated

Miron
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #2  
Old   
Renfer
 
Posts: n/a

Default Head scratcher for a empty head.....FM8 - 04-02-2007 , 03:17 PM






Ok guys,

Rookie filemaker guy here. I have what seems to be simple problem but
I can't get it solved.

I need to parse some text and it seems like it should be easy.

text is: (as an example)

Miami Beach FL 33139

I need to extract the city and remove the two letter state code and
the zip.

I use the filter function to removed the zip.

I'm left with: Miami Beach FL

I know I can use rightwords,1 to get FL (or the two letter state code)

But how do get to the point where I"m left with Miami Beach. (some
cities may be one, two or three words).

How can I just extract the two letter state code?

Any ideas would be appreciated

Miron

Reply With Quote
  #3  
Old   
Renfer
 
Posts: n/a

Default Re: Head scratcher for a empty head.....FM8 - 04-02-2007 , 04:27 PM



Thank you Howard, worked like a charm.

Now, to study it so I can understand it...

Thanks again, you are not an empty head!!!

Miron


On Mon, 02 Apr 2007 12:25:56 -0700, Howard Schlossberg
<howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
The last word is the zipcode, the second to last word is the state. So
something like this:

Zip = middlewords (CSZ; wordcount( CSZ); 1)
State = middlewords (CSZ; wordcount( CSZ) - 1; 1)
City = middlewords (CSZ; 1; wordcount( CSZ) - 2)


Renfer wrote:
Ok guys,

Rookie filemaker guy here. I have what seems to be simple problem but
I can't get it solved.

I need to parse some text and it seems like it should be easy.

text is: (as an example)

Miami Beach FL 33139

I need to extract the city and remove the two letter state code and
the zip.

I use the filter function to removed the zip.

I'm left with: Miami Beach FL

I know I can use rightwords,1 to get FL (or the two letter state code)

But how do get to the point where I"m left with Miami Beach. (some
cities may be one, two or three words).

How can I just extract the two letter state code?

Any ideas would be appreciated

Miron


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.