Exact is not exact!

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

Exact is not exact!

Postby DFH » Sun Mar 17, 2013 2:41 am

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

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

Re: Exact is not exact!

Postby DFH » Sun Mar 17, 2013 2:43 am

See
NPP_Find_Dialog.png
Notepad++ Find Dialog

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

Re: Exact is not exact!

Postby DFH » Sun Mar 17, 2013 2:49 am

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

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

Re: Exact is not exact!

Postby DataMystic Support » Tue Mar 19, 2013 1:11 pm

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.
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: Exact is not exact!

Postby DFH » Thu Mar 21, 2013 8:22 pm

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

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

Re: Exact is not exact!

Postby DataMystic Support » Tue Mar 26, 2013 3:48 pm

Ok, this is done ready for the next release
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: Exact is not exact!

Postby DFH » Tue Mar 26, 2013 6:55 pm

Thanks, Simon.


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

Who is online

Users browsing this forum: No registered users and 2 guests