July 6, 200520 yr 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
July 6, 200520 yr 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?
July 7, 200520 yr 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
July 7, 200520 yr 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
July 7, 200520 yr 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.
July 8, 200520 yr -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
July 12, 200520 yr 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.
July 13, 200520 yr 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?
July 13, 200520 yr 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