* use search and replace plugin with newline in text

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

use search and replace plugin with newline in text

Post 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?
User avatar
Jane
Site Admin
Posts: 8508
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: use search and replace plugin with newline in text

Post 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.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Re: use search and replace plugin with newline in text

Post 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.
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: use search and replace plugin with newline in text

Post 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 3907 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Re: use search and replace plugin with newline in text

Post by JoopvB »

Thanks Mike, the filter setting did it.
Post Reply