Hi Bee, 

What I had tried to with the replace function was that the first time you hit
replace it should just search for the next occurance, then the next time you hit
replace it will replace that occurance then find the next match. Perhaps I
should first check whether the currently highlighted text is what you searched
for then if it is replace it. This is the way I had it working initally but that
caused problems with RE. Anyway, I'll review the way it works.

Thanks for answering the RE question vbr, I'm still learning myself. You might
be able to help me with something, if I search for [ ]*(?=[ ]) in PSPad's normal
search it says there's an error in the search expression, however if I search
for it with phReplace I find mathces but some of the matches will have 0 length.
I'm not sure what to do with that. I expected this search to find a space with
any trailing spaces (I know there are better ways to do this, but it's a good
example for this 0 length problem)

I'm guessing PSPad first vaildates the search, I don't think vb offers any
support for validating it.

Anyway, with regard to back references, I now see what your talking about. The
reason it wont work is because I use RE to search for the match, but once it
finds it I just replace it manually. To use back references I would have to
replace it using the RE replace function, I'll look into doing this.

-- 
<http://forum.pspad.com/read.php?2,34061,38037>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem