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

find word

Post by GoSm »

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: 10504
Joined: Wed May 06, 2009 2:28 pm

Re: find word

Post by dunbarx »

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: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: find word

Post by jacque »

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: 10504
Joined: Wed May 06, 2009 2:28 pm

Re: find word

Post by dunbarx »

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: 10504
Joined: Wed May 06, 2009 2:28 pm

Re: find word

Post by dunbarx »

But still am not clear about "page 9"

Craig
Post Reply