NISUS Archives

August 2011

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Robert B. Waltz" <[log in to unmask]>
Reply To:
Date:
Tue, 9 Aug 2011 10:37:27 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
On 8/10/11, Alan Dow wrote:

[ ... ]

>Ooops, yes I see now you are quite correct,
>
>I found following relevant passage in User Manual:
>
>**********
>It is important to remember, especially for PowerFind Pro expressions, that string literals undergo interpolation (see Literals) before being used by the find commands. For example, the following commands are not the same:
>Find '\s+', 'E'
>Find "\s+", 'E'
>The first finds one or more whitespace characters, as you might expect. The second however searches for one or more of the letter 's' because the backslash is first interpreted using the rules for string literals. If double-quotes are to be used the backslash must be escaped like so:
>Find "\\s+", 'E'
>Because of this it is recommended that you use single-quotes for find command arguments.

This is fair, and a very good point, but the difficulty is that finding all this stuff is tricky. :-) If you have to know ALL of PowerFind Pro's rules to get the thing to work, most people won't get there. :-(

My comment, a few rounds back, that ANYTHING should be escape-able still stands. The idea doesn't apply to letters, but I don't like having to remember whether I need to use ' or \', [ or \[, etc. It would be much easier if \ followed by any character (except an alphanumeric) would just be escaped.

Of course, it would REALLY be nice if NWP could run Classic macros (of which I have dozens, some of them extremely complex and hard to convert) and save us all this stuff. :-) And that clearly isn't going to happen....

-- 
Bob Waltz
[log in to unmask]

"The one thing we learn from history --
   is that no one ever learns from history."

ATOM RSS1 RSS2