Ask Your Question
0

[Calc 4.3.5.2] Using the FIND function to find only whole words

asked 2015-10-20 16:48:39 +0100

jrisk gravatar image

updated 2015-10-25 01:36:25 +0100

Alex Kemp gravatar image

Really just what the title says. I have a variety of strings that I am searching through for certain words, for example:

"You are acting out of line" OR "It was all just an act"

With the word "act" being the word I am searching for. With the normal FIND function, it would come up with a number for both because both strings contain the string "act". What I would like is for the first string to give an error when run through FIND, and the second to come up positive because it contains the whole word and not a word that contains it.

Is there any way to do this, and if so, how?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-10-21 23:56:01 +0100

m.a.riosv gravatar image

As FIND() doesn't use regular expressions, I think not possible in a simple way.

But with SEARCH() and regular expression enable (Menu/Tools/Options/LibreOffice Calc - Calculate)

=SEARCH("\bact\b";Text;1)
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-10-20 16:48:39 +0100

Seen: 403 times

Last updated: Oct 21 '15