Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why doesn't LibreOffice find word boundaries correctly?

If I search for the regular expression \bhey\b, it matches " .hey. " and of course " hey ", but not "hey.hey".

Is this a bug?

Why doesn't LibreOffice find word boundaries correctly?

If I search for the regular expression \bhey\b, it matches " .hey. " and of course " hey ", but not "hey.hey"." hey.hey ".

Is this a bug?

Furthermore, if I change the search to (\b|\.)hey(\b|\.) it will match the first "hey" in "hey.hey", but not the second one!

Why doesn't LibreOffice find word boundaries correctly?

If I search for the regular expression \bhey\b, it matches " .hey. " and of course " hey ", but not " hey.hey ".

Is this a bug?

Furthermore, if I change the search to (\b|\.)hey(\b|\.) it will match the first "hey" in "hey.hey", but not the second one!

UPDATE: It seems that periods/full stops "erase" word boundaries when they occur in the middle of a word. They aren't considered a word character at that point though. Sounds like a bug to me, but I need a way to select words separated by decimals. My "furthermore" search above doesn't work because when it searches "hey.hey" it will actually match the first "hey." leaving "hey" which is mysteriously missing a word boundary on the left.

The best I can manage is hey(\b|\.) which will match everything I need it to, but will also match "they", which is hopefully OK for my purposes. ("Hey" would actually be a long list of abbreviations like (ABC|XYZ|ETC).)