Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

extracting text from hyphenated words

Featured Replies

I'm trying to get the content in the text field, TITLE, which has "I haven't" as text to calculate to the field, ADJUSTED TITLE, as "I have not"

I'm trying to sort titles alphabetically rather than "computerly."

Other considerations are

"we'll" to "we will"

"isn't" to "is not"

"He's" to "He is"

"We're" to "We are"

and so forth

If there's another post already like this one on this forum, I apologize, as I haven't been able to find it

Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( TITLE, "'re", " are" ), "he's", "he is" ), "'ll", " will" ), "won't", "will not" ), "shan't", "shall not" ), "can't", "can not" ), "n't", " not" )

Did I miss any?

  • Author

Thanks Queue.

There's still a problem with the hyphen. I've turned smart quotes off.

""he's" won't compute because of the hyphen

Anyway, you've got me on a good track by using "re" for " are" and so forth

Hi Jeff,

the ' is an aposphy, not a hypen. smile.gif

I changed JT's calculation some, it seems to do what you want, but if it breaks, there are no warranties, written or implied.

Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute(Substitute( TITLE, "'re", " are" ),

"'s", " is" ), "'ll", " will" ), "won't", "will not" ), "shan't", "shall not" ), "can't", "can not" ), "n't", " not" ),

"it's", " It is")

Lee cool.gif

  • Author

Oops!

Definitely not a hyphen

Thanks Lee!

I didn't use "'s" -> " is" because "John's Book" becomes "John is Book".

Good call on "it's", though, Lee, though you need to move it before the 's substitute or it will have no effect.

"He's" worked fine on my machine. Ask.gif

-Queue- said ... "He's worked fine on my machine.

PJB's calc showed ""he's"

Your calc showed "he's"

"He's" worked on my box also. It doesn't appear to be in the one Lee posted but I assume it'd work there also ... ooops ... excuse me it would work also. smile.gif

Yes indeed, the list could keep growing. I think I might use a simple table; but that's just me. wink.gif

In fact, I've considered such a table (to address the 'and so forth') in the past but just never got around to it.

LaRetta

There are other ambiguities. In addition to what Queue and LaRetta just alluded to, 's could mean either possessive form or "is" or "has", and 'd could mean either "had" or "would."

And I'm still trying to figger out ain't.

  • Author

Is there any way someone could change the subject from "extracting text from hyphenated words" to "extracting text from apostrophe'd words"?

Also

I'm using FMD 6 and I can't get a calculation to recognize the apostrophe at all. For example:

Substitute(title, "he's", "he is") still results in "he's"

Any comments?

If you have smart quotes turned on, Filemaker will replace a single quote character with a real apostrophe.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.