Find and replace weirdness

Build ID: 5d19a1bfa650b796764388cd8b33a5af1f5baa1b
CPU threads: 8; OS: Windows 6.1; UI render: default;
Locale: en-AU (en_AU); Calc: group threaded
Just downloaded, as my previous version did this as well.

I have typed up a simple document to demonstrate what happened when I was working with a "real"ore complicated one.
I wanted to Find and replace the word “wife” with “Wife” throughout the document.

Here is the result in my demo document
This is the original: My very elderly grandmother just sat up near pluto, then slowly drifted off into space, rotating gradually.

I then asked to replace “wife” with “Wife”: Wife very elderly grandmother just sat Wife near pluto, then slowly drifted Wife into space, rotating gradually.

So I then asked to replace all "seat"s to “Wife”:

Wife very elderly grandmother Wife Wife Wife Wife pluto, Wife slowly drifted off into Wife, rotating gradually.

I then asked to replace all "seat"s with “Marbles”

Just to make sure it was just a four letter word (which I was now starting to use myself), I tried "seats"s to "marbles:

My very elderly grandmother just marbles up marbles pluto, then slowly drifted off into marbles, rotating gradually.

So, I tried “ravens” and “gimme”:
My gimme elderly grandmother just sat up near pluto, gimme slowly drifted off into space, rotating gradually.

Could somebody tell me what on earth?..please?

Thanks

Nick

I don’t quite understand.

Do you say that you type into an empty document this:

My very elderly grandmother just sat up near pluto, then slowly drifted off into space, rotating gradually.

Then you start Find & Replace, and (with what settings?), replace wife (something absent in the string) with Wife, and get this:

Wife very elderly grandmother just sat Wife near pluto, then slowly drifted Wife into space, rotating gradually.

Is that correct?

Yes! This how bizarre it is! I used “wife” to be replaced by “Wife” because that is what gave trouble in my original document. It was ‘finding’ “wife” where there was no “wife”. I did not want to show my document, so I typed what I posted and it found “wife” everywhere.And then I tried the other stuff to try to work out a pattern. Pattern weirdness. Settings bog standard, then ‘Replace all’. The ‘Replace All’ is immaterial. I first saw it when I replaced one by one.

and it should be “mother” I now realise

Unable to reproduce here on (LO 6.1.2, Win 7x64 Pro) with any combination of Find & Replace options.

Curious…

I can reproduce this with Win 7/LO 6.0.6 and Mike Kaganski’s interpretation of the question. But only by using Search & Replace with Similarity search checked. If you really need this, read the advice at https://help.libreoffice.org/Common/Similarity_Search and see if you can find better settings to define similar.

Platterbaff’s comment (above) should probably be an “answer”, not a comment. Meanwhile, @OldNick, if you could include a screenshot of your search-replace dialog box showing the settings you are using, that would help enormously.

Ok. Yeah the Similarities was the clue, thanks.

If it causes this sort of grief, why is it default? Seems a bit naff.

10 characters

A fair statement of our position seems to be that:

The problem arose because Search & Replace (S&R) was set to Similarity search (Ss) on.

https://help.libreoffice.org/Common/Similarity_Search gives advice on how any odd behaviour might be lessened by adjusting the settings used to define “similarity”. But I have never bothered to explore this because I have not wanted to use the feature – it is a question of who is to be master, me or the software, and I am still naive enough to think it should be me.

I have left this part of my S&R unchanged since I first downloaded LO 3. Its default was off, and it follows common rules by reopening with Ss set to whatever it was when last used (for me always off). But OldNick finds otherwise; S&R opens with it on. That, I fear, is beyond my competence to explain.

OK. This was the 1st time (AFAIK) time I used Fnr ( I have def not used any settings) and that daft Simil thing was set

THIS IS NOT JUST A REPLY/COMMENT. I assume that being a REPLY it will help other browsers by being more salient.

The puzzle was because “Similarities” was set to ticked. So any string that matched the “find” string by 2 chars (at default) would be changed.

I do not know why this is default!

I post this to help others who encounter this will be helped, and not have to trawl too deeply.

I’m not sure that it is a “default” – I’ve been using LibreOffice since it forked from OpenOffice.org in 2011, and have installed it under Windows, Ubuntu, Linux Mint, and OSX, and have never had the “Similarity” search option checked “out-of-the-box”. It seems your experience was different! Odd.