Page 1 of 1

Exact is not exact!

Posted: Sun Mar 17, 2013 2:41 am
by dfhtextpipe
I hit this issue again yesterday.

In TextPipe Replace filters, choosing Exact as the pattern type does not do "what it says on the can".

I was processing USFM files - and these contain lots of semantic tags identified by the reverse solidus.
You can see the USFM Reference at http://paratext.org/usfm

Now suppose I need to match exactly the tag \tc1 (Table cell in column 1).

Match fails because TextPipe sees the \t part of \tc1 as a tab character. This is deeply frustrating.

Now the developers of the open source Unicode text editor Notepad++ certainly perceived that there was a problem.
See http://notepad-plus-plus.org/

If you examine their search dialog, you'll see that they distinguish three kinds of Search Mode:
  • Exact
    Extended (\n, \r, \t, \0, \x ...)
    Regular expression
See attached image.

With Exact selected, the pattern \tc1 will be searched as an exact "printable characters" text match.
With Extended selected, the patterm \tc1 will be search as a tab followed by the characters c1.

In TextPipe, there is just confusion, because the user is misled by the use of the word "Exact".

What needs to be done, IMHO, is for TextPipe to follow the example of Notepad++ and distinguish between Exact and Extended.

David

Re: Exact is not exact!

Posted: Sun Mar 17, 2013 2:43 am
by dfhtextpipe
See
Notepad++ Find Dialog
Notepad++ Find Dialog

Re: Exact is not exact!

Posted: Sun Mar 17, 2013 2:49 am
by dfhtextpipe
Lest you comment that I should have searched for \\tc1 - this is just as counter-intuitive (as an Exact pattern) for a novice.
Worse still, it doesn't work either.

The only way I could succeed to match \tc1 was by choosing Perl pattern matching, and wrap the search item between \Q and \E.

i.e. Search for \Q\tc1\E

My complaint is that the user should not need to resort to such advanced trickery to achieve something that ought to be simple enough for beginners.

David

Re: Exact is not exact!

Posted: Tue Mar 19, 2013 1:11 pm
by DataMystic Support
Ok, we can certainly change this.

Using perl regex, just using
\\tc1
should have worked.

But I do get your point. We are working on a new release with a number of the issues you have raised being addressed.

Re: Exact is not exact!

Posted: Thu Mar 21, 2013 8:22 pm
by dfhtextpipe
Perl regexp \\tc1 was something I also tried, but I think it failed. \x5c(tc1) would probably work.

I have faced similar issues with USFM footnote tags that begin with \f which TextPipe (Exact) still sees as a form-feed.

Glad to note that you appreciate my concerns, and that a solution is in preparation.

David

Re: Exact is not exact!

Posted: Tue Mar 26, 2013 3:48 pm
by DataMystic Support
Ok, this is done ready for the next release

Re: Exact is not exact!

Posted: Tue Mar 26, 2013 6:55 pm
by dfhtextpipe
Thanks, Simon.