Page 1 of 1

PowerFind problems?

Posted: 2004-09-11 16:05:42
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

Posted: 2004-09-11 19:22:03
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

Posted: 2004-09-11 21:57:04
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

Posted: 2004-09-12 06:15:13
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

Posted: 2004-09-12 12:21:47
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

Posted: 2004-09-13 07:55:09
by cchapin
I'm still having trouble with this and have filed a bug report. Anybody else have any breakthroughs?

--Craig

PowerFind problems!

Posted: 2004-09-13 11:55:16
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.

Posted: 2004-09-13 16:09:06
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

Still doesn't work for Replace and Find!

Posted: 2005-01-07 02:53:06
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?

Posted: 2005-01-07 07:58:16
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...

Posted: 2005-01-07 18:10:00
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".

Good news!

Posted: 2005-01-08 00:36:01
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

Find and replace.

Posted: 2005-01-16 03:37:29
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.