*use search and replace plugin with newline in text

Writing and using plugins for Version 5 and above.
JoopvB
Famous
Posts: 123
Joined: 02 May 2015 14:32
Family Historian: V6.2

use search and replace plugin with newline in text

Postby JoopvB » 10 Jun 2019 13:29

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: 7617
Joined: 01 Nov 2002 15:00
Family Historian: V6.2
Location: Somerset, England
Contact:

Re: use search and replace plugin with newline in text

Postby Jane » 10 Jun 2019 14:06

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."

JoopvB
Famous
Posts: 123
Joined: 02 May 2015 14:32
Family Historian: V6.2

Re: use search and replace plugin with newline in text

Postby JoopvB » 10 Jun 2019 14:20

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: 15916
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: use search and replace plugin with newline in text

Postby tatewise » 10 Jun 2019 14:41

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 260 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

JoopvB
Famous
Posts: 123
Joined: 02 May 2015 14:32
Family Historian: V6.2

Re: use search and replace plugin with newline in text

Postby JoopvB » 10 Jun 2019 14:50

Thanks Mike, the filter setting did it.


Return to “Plugin Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest