fenrisW0lf:
--------------------------------------------------------------------------------
vbr,

I have your phReplace script installed as I was using it for multiline matches
(it is excellent!)

I can't seem to get the example you posted working. I am not sure where the
function statement goes. I tried pasting the example regex and function line
into the search dialog but it doesn't find anything (I copied the sample data to
a new text file).

Say I have this regex: -\s+([a-z]), how would I apply the function statement to
it?

Cheers and thanks.
--------------------------------------------------------------------------------


Hi,
I'm not the author of the excellent phReplace (it's Paul Heasley's work
http://www.phdesign.com.au/document.php?page=software_phreplace), 
the script I mentioned is my far more primitive JavaScript I hacked together
mostly for my specific needs. You will find the file on the following page along
with the installation guide (basically copy into "...\PSPad\Script\JScript\" and
recompile scripts).
http://www.vbr.wz.cz/pspad/poor-man-s-REplace.html
or directly:
http://www.vbr.wz.cz/pspad/re-repl-e-0-0-8.js
(right-click: save as: the location above)

It doesn't have any real gui, only a PSPad script prompts (and lots of
shortcuts).

After installing it simply call Scripts :: Poor man's REplace :: *RE replace*
use e.g. the following pattern:
/(-\s+)([a-z])/g, function(match, paren1, paren2){ return paren1 +
paren2.toUpperCase();}

and confirm the replace (it works for the selected text or the whole file-
regardless of the caret position).

Just tu make sure what the replace should do - in this form it uppercases a
letter, which is preceded by some whitespace, which is itself preceded by "-".

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

Odpovedet emailem