Exact is not exact!

Get help with installation and running here.

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

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

Exact is not exact!

Post 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
David
dfhtextpipe
Posts: 986
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Exact is not exact!

Post by dfhtextpipe »

See
Notepad++ Find Dialog
Notepad++ Find Dialog
David
dfhtextpipe
Posts: 986
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Exact is not exact!

Post 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
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Exact is not exact!

Post 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.
dfhtextpipe
Posts: 986
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Exact is not exact!

Post 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
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Exact is not exact!

Post by DataMystic Support »

Ok, this is done ready for the next release
dfhtextpipe
Posts: 986
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Exact is not exact!

Post by dfhtextpipe »

Thanks, Simon.
David
Post Reply