AnsweredAssumed Answered

Simple dealing with Hyphens

Question asked by DRR on Aug 13, 2012
Latest reply on Aug 13, 2012 by philmodjunk


Simple dealing with Hyphens


I have searched and read about dealing with hyphens, but I am missing a hopefully simple detail.

Using FM 12 Pro:

I have a FullName field and would like to extract last names. However, using the Rightwords calculation, it will only pull or extract the last part of the hyphenated name. (example "Smith-Jones" will return only "Jones"). I tried using the count function, but that doesn't seem to work because FM sees hyphens between names as a unifying unit, so Ann Smith-Jones will contain two names as would Ann Jones. 

I have read somewhere that one could use a substitute function where you replace "-" with " " or a space, then do the calculation, but I am not sure how to put the entire calculation together and then get the hyphen back in afterward.

Thanks in advance.