Search/replace list issues

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Search/replace list issues

Postby DFH » Tue Jan 03, 2012 3:48 am

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

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

Re: Search/replace list issues

Postby DataMystic Support » Sun Jan 22, 2012 10:27 pm

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.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Search/replace list issues

Postby DFH » Wed Jan 25, 2012 6:18 pm

Excellent!

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

David


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 1 guest