Search/replace list issues

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Search/replace list issues

Post by dfhtextpipe »

There are subtle but critical differences in the way that replace filters work!

Here is the required action:

Code: Select all

Perl pattern [(\Q\i0 \E)] with [\\nosupersub$1\\super ]
   [X] Match case
   [ ] Whole words only
   [ ] Case sensitive replace
   [ ] Prompt on replace
   [ ] Skip prompt if identical
   [ ] First only
   [ ] Extract matches
   Maximum text buffer size 4096
   [ ] Maximum match (greedy)
   [ ] Allow comments
   [ ] '.' matches newline
   [X] UTF-8 Support
Compare using the following two methods:
  • Method 1: Find pattern (perl style)
    Method 2: Search/replace list
  • Method 1 works as required.
    Method 2 does not!
With the former, priority is given to the "\\" part of the replacement pattern, and this is correctly interpreted as specifiying a literal "\".
With the latter, priority is given to the "\n" part of the replacement pattern, and this is incorrectly interpreted as a "new line".

The contextual help for both methods does not give any clue why the results should be different.
In fact the help for both methods ultimately leads one back to the pattern matching reference.

Method 2 is summarized as "This filter is used to easily define a set of search/replace pairs that have identical search options."

I discovered the issue after combining several consecutive replace filters (with identical search options) into a search/replace list.
It was somewhat annoying to have to add workarounds to address this issue, especially after having tested and debugged and each filter separately.

David
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Search/replace list issues

Post by DataMystic Support »

Hi David,

We found the bug - it only occurs in the replacement term for search/replace lists when consecutive search was selected.

It will be fixed in v9.0 shortly.
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Search/replace list issues

Post by dfhtextpipe »

Excellent!

Good to know that my issue report was something that led you to find the root cause and fix it.

David
David
Post Reply