When working with Derek I found a slight problem with the date replace when working with date phrases. The dates had & in them and were wrapped with double quotes, I wanted to replace the & and then remove the double quotes, but could not as the first replacement produced a phrase and the plugin wanted to prompt each one.
I wonder if it might be worth adding an option to clear all quotation marks from date fields when doing and replacements on them?
* Search and Replace (date replacement)
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Search and Replace (date replacement)
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 27080
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Search and Replace (date replacement)
As I posted in that other thread, the following that worked for the user:
Search: "(.*)&(.*)"
Replace: %1AND%2
with LUA Pattern Mode
However, I realise this is not an obvious workaround, because it relies on a deep understanding of LUA Patterns.
I recognise that users may wish to make global changes to Date Phrases and it is an oversight that the Plugin prevents that.
Unfortunately, simply removing the string quotes from Date Phrases does not work when ...interpreted as is chosen, because the interpreted Date becomes incorporated into the Date Phrase.
Also, it is perhaps possible that a user wants to retain a Date Phrase that just happens to be a valid Date format.
I have two proposals, but I prefer the first one as it is more explicit although making the dialogue more complex:
(1) Provide a toggle option for Date Phrase Warnings similar to the Date Warnings on the Extra Filters tab.
(2) If Confirm every item found is NOT ticked, then automatically inhibit the Date Phrase Warnings.
The Date Phrase Warning text also needs rewording in the case when ...interpreted as is chosen.
Search: "(.*)&(.*)"
Replace: %1AND%2
with LUA Pattern Mode
However, I realise this is not an obvious workaround, because it relies on a deep understanding of LUA Patterns.
I recognise that users may wish to make global changes to Date Phrases and it is an oversight that the Plugin prevents that.
Unfortunately, simply removing the string quotes from Date Phrases does not work when ...interpreted as is chosen, because the interpreted Date becomes incorporated into the Date Phrase.
Also, it is perhaps possible that a user wants to retain a Date Phrase that just happens to be a valid Date format.
I have two proposals, but I prefer the first one as it is more explicit although making the dialogue more complex:
(1) Provide a toggle option for Date Phrase Warnings similar to the Date Warnings on the Extra Filters tab.
(2) If Confirm every item found is NOT ticked, then automatically inhibit the Date Phrase Warnings.
The Date Phrase Warning text also needs rewording in the case when ...interpreted as is chosen.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Re: Search and Replace (date replacement)
The first solution sounds fine, and it would save having to use complex patterns.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 27080
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Search and Replace (date replacement)
An updated V2.2 of the Search and Replace Plugin is in the Plugin Store with the above improvements.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry