PowerFind problems?

Have a problem? A question? This is the place for answers from other Express users.
Post Reply
Bobintosh
Posts: 2
Joined: 2004-09-11 15:58:48

PowerFind problems?

Post by Bobintosh »

Anyone got the find/replace with wildcards and found to works properly? Tried the explanation in the manual in the PowerFind section, but all I get when replacing is all but the found1-foundX.
Example: 98-45-23
PowerFind(Pro): [0-9][0-9]-[0-9][0-9]-[0-9][0-9]
"PowerReplace": Found2 Found1-Found4 Found3-Found6 Found5
Expected result: 89-54-32
Real result: --

Am I doing something wrong?

Thanks
cchapin
Posts: 424
Joined: 2004-02-25 18:28:40
Location: Nagoya, Japan

Post by cchapin »

Bobintosh,

Try this in PowerFind Pro. Don't forget the parentheses.

Find: ([0-9])([0-9])-([0-9])([0-9])-([0-9])([0-9])
Replace with: \2\1-\4\3-\6\5

Or this in PowerFind. Don't forget the ( )Found tags.

Find: ( 09 )Found ( 09 )Found - ( 09 )Found ( 09 )Found - ( 09 )Found ( 09 )Found
Replace with: Found2 Found1 - Found4 Found3 - Found6 Found5

I hope this helps.

--Craig
Bobintosh
Posts: 2
Joined: 2004-09-11 15:58:48

Post by Bobintosh »

Thanks for the suggestion, Craig, but nope, same result: --

Something is not working for me when it comes to find/replace with found.

Don’t need it that often, but it is really frustrating when it doesn’t work as advertised those few times it could slice hours of a tedious (not to say dead boring) job.

Does this work properly for anyone else? If it does, then I think I’ve got a broken copy.

-- Bob
rallx
Posts: 38
Joined: 2004-09-11 12:05:03

Post by rallx »

I can confirm that this doesn't work, either in PowerFind or PowerFindPro. The search string works correctly, but the paste string does not.

I also tried the example in the manual to replace duplicate paragraphs with a single instance:

Find: (.+\n)\1+
Replace: \1

and it eliminates both paragraphs rather than just the duplicate.

This has probably been discussed before but, as an NW classic user it seems confusing to allow use of the typed parentheses characters "()" as substring delimiters in PowerFind (as opposed to PowerFindPro where this is normal). It seems to go against the philosophy of anything typed is to be matched whereas metacharacters, delimiters, etc. are chosen from the menu (although I realize that tab and return have to be handled differently).

As a future enhancement, I would like to see a resizable find box. It doesn't take very long until a search or replace string fills up the space and disappears off the bottom.

Rick
cchapin
Posts: 424
Joined: 2004-02-25 18:28:40
Location: Nagoya, Japan

Post by cchapin »

Hi, Bobintosh and rallx.

After further experimentation, I agree. Something seems to be working incorrectly, inconsistently or at least in an unexpected way. I'm fairly new to Nisus and to regular expressions, so there's room for error on my part.

The problems that I've encountered all seem to relate to found strings being inserted or kept in the resulting replacement text.

Sometimes when I try a search-and-replace pattern in either PowerFind or PowerFind Pro, it works -- and sometimes it doesn't. Sometimes a test pattern will work in another program but not in Nisus Writer Express.

I'm puzzled. I haven't been able to figure out why it works sometimes and not others. I haven't detected a clear pattern yet. I'll keep at it, but right now I need to take a break.

--Craig
cchapin
Posts: 424
Joined: 2004-02-25 18:28:40
Location: Nagoya, Japan

Post by cchapin »

I'm still having trouble with this and have filed a bug report. Anybody else have any breakthroughs?

--Craig
rmark
Official Nisus Person
Posts: 428
Joined: 2003-02-11 10:49:05
Location: Solana Beach, CA
Contact:

PowerFind problems!

Post by rmark »

Nisus People,

I'm sorry to report... late Friday afternoon, we notice a problem in that Replace does not work. However (small consolation), Replace All does work. We've got an engineer assigned to the problem already.

Thank you for your patience.
Write On!
Mark Hurvitz
Nisus Software Inc.
cchapin
Posts: 424
Joined: 2004-02-25 18:28:40
Location: Nagoya, Japan

Post by cchapin »

By golly, you're right. Replace works in general, but it won't interpolate found strings. Replace All does it fine. That must be why it seemed to work for me sometimes but not other times.

I'm glad someone figured out what was going on and that someone's working on a fix.

--Craig
roncraig
Posts: 2
Joined: 2005-01-07 02:40:15
Location: Iwaki or Mito Japan

Still doesn't work for Replace and Find!

Post by roncraig »

Well, that last post was in September; it's now January and the problem remains in version 2.1.1. If no solution is yet in sight, how about updating the Help files at least? (I mean, I wasted a good hour and a half this afternoon trying to figure out what I was doing wrong based on the information in Help. D'oh!)

I can understand that replacing one (current) instance of a search string and finding the next is a different process than (finding and then) replacing all instances of said string...but have the two been implemented as completely independent code? That's the only reason I can figure for Replace All working with ()Found1 but not Replace and Find.

What gives here?

--Ron


PS. I registered just now to post this and was surprised to see that this BBS isn't set up for email verification and that it's still running version 2.0.1 of phpBB. Didn't anyone hear about the recent worm attacks?
rallx
Posts: 38
Joined: 2004-09-11 12:05:03

Post by rallx »

Yes, PowerFind and PowerFindPro are still broken in v. 2.1.1 such that they cannot be depended on for any complex search using found metacharacters. If I have:

12-34-56

and specify find what: ([0-9]+)-([0-9]+)-([0-9]+)

and replace with: \3xxx\2xxx\1

I get: xxxxxx

when the correct result should be: 56xxx34xxx12

The result is exactly the same with PowerFind or PowerFindPro.

This is a shame as this functionality is one of the few things that sets NWE apart from the competition. You would think that this would have been a high priority fix. Maybe they are waiting to see what "iWork" looks like... :?

And, complex find and replaces (when they work) are agonizingly slow. In BBEdit, I just reformatted a half million line long text file for entry into a GIS program. This involved switching numbers and lines around, as well as deleting lines. Using BBEdit's grep (equivalent to PowerFindpro) it took less than 30 seconds! When I have tried something similar in NWE on a much smaller file (orders of magnitude smaller), NWE churns away for 10 or 20 minutes.

I loved NW Classic and really, really want to like NWE, but I just don't find myself using it that much...
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin »

This bug where "Replace All" works properly but "Replace" does not has been fixed internally. No doubt the next version released will work properly in this respect.
have the two been implemented as completely independent code? That's the only reason I can figure for Replace All working with ()Found1 but not Replace and Find.
We're not using different regular expression parsers for each of the "Replace" buttons or anything crazy like that-- if that's what you're thinking. Just a matter of the "Replace" code preparing the text to replace a bit differently than "Replace All".
roncraig
Posts: 2
Joined: 2005-01-07 02:40:15
Location: Iwaki or Mito Japan

Good news!

Post by roncraig »

Martin,

Thanks for the info; that's really great news; be looking forward to it!
We're not using different regular expression parsers for each of the "Replace" buttons or anything crazy like that-- if that's what you're thinking. Just a matter of the "Replace" code preparing the text to replace a bit differently than "Replace All".
No, I wasn't thinking of the regex parser but the other code; was beginning to worry how "differently" that "a bit" might be! :wink:

--Ron
Arnold
Posts: 3
Joined: 2005-01-16 03:17:12

Find and replace.

Post by Arnold »

I was an enthusiastic Nisus fan and promotor of Nisus since the Mac-plus. I am editing a lot of texts with different lay outs, to a standard layout. The powerfind functions together with de 'record' macro command made this work easy. However the advantages of Nisus writer classic have all disappeared for me in NWE by the changes in the Powerfind features. The most important ones:
1. It is not possible to save the find requests together with the replace requests in one request.
2. It is not possible in Powerfind to replace a return with a space.
3. It is not possible to 'macroize' these requests.
4. It is not possible to 'record' these macro's to a serie of macro's.
Please Nisus, you were so excellent, do not disappoint me.

Arnold.
Post Reply