Hi,
this should be doable via PSPad scripting, but on long log files there might be
performace problems as the text manipulation is done e.g. in javascript.
See the script reference in the file
...\PSPad\Script\ReadMe.rtf
And the Script section in the PSPad Help

You may also try my rough script for javascript regexps etc.:
http://www.vbr.wz.cz/pspad/poor-man-s-REplace.html
(originally written to get multiline search and replace in PSPad)

e.g. the function "search - list" which just lists the matches.
I believe, it should be possible to add the context lines, you need, given the
performance is ok for your data sizes.

It would be easier to put the context line directly to the regex pattern, but
you could mask near matches within this context:
for the above script e.g. 
/([^
]*
){0,3}([^
]*error[^
]*
)([^
]*
){0,3}/g

Anyway, if you already have a tool for you task, it could be possible to
integrate it to PSPad, e.g. in the Tools panel (Ctrl+F2) as favourite app. (you
can e.g. catch the program output to pspad log window).

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

Odpovedet emailem