find word

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
GoSm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 13
Joined: Thu Nov 09, 2006 3:38 pm
Location: Tuebingen (Germany)

find word

Post by GoSm » Sun Mar 10, 2024 11:01 pm

I am preparing a register for a projected book. In p. 9, there is written: "(Gesamtwürdigung des Werkes)".
Now I start 2 searches of the form "find word":
a) for "Gesamtwürdigung"
b) for "Werkes"
The results: a) ist "not found", b) is found on p. 9.
To me the results seem contradictory, because brackets never belong to a word, beit in the beginning, beit in the end of the word, So, "Gesamtwürdigung" should be found too.
Or made I something wrong?

Thank you for your answer!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: find word

Post by dunbarx » Mon Mar 11, 2024 12:15 am

Hi.

Where do you see brackets ("[" or "]") in your text?

You are talking about two different "find" actions, correct? But are you asking why the first one failed and the second one succeeded? And what is meant by "page 9"? Do you mean card 9?

Can you post the code you used?

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7239
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: find word

Post by jacque » Mon Mar 11, 2024 6:41 pm

LC finds words by looking for spaces between words. If there is no space after a bracket then LC thinks the bracket is part of the word. I'm not sure if this will work, but try
"find trueword" instead of "find word". It isn't in the dictionary but it might work. The keyword "trueword" ignores punctuation and symbols.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: find word

Post by dunbarx » Mon Mar 11, 2024 7:16 pm

Hi.

Aha. By "brackets" do you mean parentheses "(" or ")"?

If so, then something Jacque mentioned may be an issue, since those "brackets" are part of the word you are searching for. So when you use the "find word" form of the "find" command, unless you:

Code: Select all

  find word "(Gesamtwürdigung"
the find will fail. If you instead:

Code: Select all

find "Gesamtwürdigung"
or
find string "Gesamtwürdigung"
Livecode will work fine.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: find word

Post by dunbarx » Mon Mar 11, 2024 7:18 pm

But still am not clear about "page 9"

Craig

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”