Reply to topic  [ 5 posts ] 
Congratulations AND PowerFind Feature Requests 
Author Message

Joined: 2003-07-22 01:31:29
Posts: 32
Congratulations on releasing NW Pro. I've found and reported at least one bug with attribute-sensitive Find/Replace, but the prognosis is good.

A couple things though: Nisus's PowerFind Pro implementation has fallen seriously behind the times in terms of standard regular expression support. At the very least, you should support for positive and negative lookahead/lookbehind. Even in NW Classic, positive lookahead/lookbehind was supported (using different syntax, but with the functionality intact). That is, in modern regex, the (?= ... ), (?<! ... ), (?<= ... ), and (?! ... ). The first two are roughly equivalent to NW Classic' :> and :< operators.

Also, there is no functional \A or \Z for accessing the beginning and end of document, though that can be gotten around more easily. Those are the two biggest ommisions in the current PowerFind, although there are others, which are supported by all the other text processors that handle regular expressions and even Adobe InDesign CS3 (whose regex support is actually superb).


2007-07-09 11:44:52
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
While we don't support lookbehind, you should find that positive and negative lookahead work properly, eg: "(?=text)" and "(?!text)". I will note that we are looking into the possibility of replacing our regex engine in a future release to increase its capabilities.

As for "\A" and "\Z", the latter should work properly. It looks like there is a problem with "\A" though- I'll file a bug, thanks.


2007-07-09 16:27:04
Profile WWW
User avatar

Joined: 2007-04-12 04:01:46
Posts: 767
Location: Melbourne, Australia
Post 
Hello Martin

Kino on the Dartmouth list pointed this out as one of the problems (along with no access to check the dictionary) of writing a quality macro to find capitalization errors at the beginning of sentences (see the thread "capitalization"). You need "look behind" to cut out false positives such as abbreviations.

In this special case, Philip Spaelti suggested a workaround:

'On a first past look for all abbreviations and then "shield" those periods with a character (e.g. a backslash, so "e.g." becomes "e.g.\"). After you fix the capitalization, another pass is needed to remove the "shield" characters.'

The abbreviations would still need to be listed in the macro because the macro wouldn't be able to access the dictionary to find the abbreviations there, unfortunately, but such a scheme would be a step closer.

It might work in some other instances where look behind was needed too.

Cheers, Geoff

Geoffrey Heard, Business Writer & Publisher

"Type & Layout: Are you communicating or just making pretty shapes" -- Revealed! The secrets of how you can use type and layout to turbocharge your messages in print. See the book at http://www.worsleypress.com


2007-07-10 16:33:19
Profile WWW

Joined: 2006-06-29 07:56:30
Posts: 81
Location: Hudson River Valley, NY
Post 
Isn't lookbehind available in NWP via Perl?

-Steve


Last edited by ssampler on 2007-07-11 05:44:47, edited 1 time in total.



2007-07-10 19:17:18
Profile

Joined: 2003-07-22 01:31:29
Posts: 32
Post 
Lookbehind may be available within Perl, but Perl doesn't offer access to the even more important features (to my workflow) of attribute-sensitive PowerFind Pro.


2007-07-10 19:21:22
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software