Page 1 of 1
Search and Replace (date replacement)
Posted: 07 Jun 2014 08:13
by Jane
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?
Re: Search and Replace (date replacement)
Posted: 07 Jun 2014 10:55
by tatewise
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.
Re: Search and Replace (date replacement)
Posted: 07 Jun 2014 11:07
by Jane
The first solution sounds fine, and it would save having to use complex patterns.
Re: Search and Replace (date replacement)
Posted: 09 Jun 2014 11:10
by tatewise
An updated V2.2 of the Search and Replace Plugin is in the Plugin Store with the above improvements.