Page 1 of 1

use search and replace plugin with newline in text

Posted: 10 Jun 2019 13:29
by JoopvB
I am trying to use the Search and Replace plugin to replace text in the note field of marriage facts. The text includes newlines like:
[[
text 1:
text 2:
]]

change to:
[[
newtext:
]]

But the plugin gives an error memo and refuses to do it.

What am I missing?

Re: use search and replace plugin with newline in text

Posted: 10 Jun 2019 14:06
by Jane
What exactly does the error say?

Do you have patterns turned on? If so you will need to escape the square brackets with a percent sign.

Re: use search and replace plugin with newline in text

Posted: 10 Jun 2019 14:20
by JoopvB
It says:
Newline characters in search&/or replace text are reserved exclusively for long text fields, such as note, fact address, text from source.

LUA patters is turned off (I am doing a text to text replace; only thing is that it is a multi-line text).

The square brackets are not part of the search nor of the replace text.

Re: use search and replace plugin with newline in text

Posted: 10 Jun 2019 14:41
by tatewise
That message suggests you have NOT set the Filters to just Note fields.

I suggest you restrict the Search Scope to Marriage (MARR.FAM) and Basic Filters to Note fields.

To be very specific, on the Extra Filters tab set Note fields top right to Fact Notes (~Fact.NOTE).

If the [[ and ]] are not part of the required Search text or Replace text then do NOT enter them.
SearchAndReplaceMarriageNotes.png
SearchAndReplaceMarriageNotes.png (23.72 KiB) Viewed 491 times

Re: use search and replace plugin with newline in text

Posted: 10 Jun 2019 14:50
by JoopvB
Thanks Mike, the filter setting did it.