# 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

edit retag close merge delete

1

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?

( 2018-10-28 08:50:52 +0200 )edit

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.

( 2018-10-28 11:25:22 +0200 )edit

and it should be "mother" I now realise

( 2018-10-28 13:07:36 +0200 )edit

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

Curious...

( 2018-10-28 14:27:16 +0200 )edit
2

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/S... and see if you can find better settings to define similar.

( 2018-10-28 16:14:34 +0200 )edit

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.

( 2018-10-28 18:57:41 +0200 )edit

Ok. Yeah the Similarities was the clue, thanks.

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

( 2018-10-28 23:11:51 +0200 )edit

10 characters

( 2018-10-28 23:14:51 +0200 )edit

Sort by » oldest newest most voted

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/S... 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.

more

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

( 2018-10-29 14:31:18 +0200 )edit

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.

more