Jeff Bills Posted July 6, 2005 Posted July 6, 2005 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
-Queue- Posted July 6, 2005 Posted July 6, 2005 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?
Jeff Bills Posted July 7, 2005 Author Posted July 7, 2005 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
Lee Smith Posted July 7, 2005 Posted July 7, 2005 Hi Jeff, the ' is an aposphy, not a hypen. 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
-Queue- Posted July 7, 2005 Posted July 7, 2005 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.
LaRetta Posted July 8, 2005 Posted July 8, 2005 -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. Yes indeed, the list could keep growing. I think I might use a simple table; but that's just me. 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
BobWeaver Posted July 12, 2005 Posted July 12, 2005 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.
Jeff Bills Posted July 13, 2005 Author Posted July 13, 2005 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?
comment Posted July 13, 2005 Posted July 13, 2005 If you have smart quotes turned on, Filemaker will replace a single quote character with a real apostrophe.
Recommended Posts
This topic is 7072 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now