find ^(\d{1,4}) [^\d]\*(\d{4,5}) .*(\d)$
replace EXEC SYS.KILLSID (,,)
Estou tentando superar isso:
1200 PORTAL oracle 29489 17:57 48 username cell single block physical read 2
para isso:
EXEC SYS.KILLSID (1200,29489,2)
find ^(\d{1,4}) [^\d]\*(\d{4,5}) .*(\d)$
replace EXEC SYS.KILLSID (,,)
^(\d{1,4})\D+(\d{4,5}).+(\d)$
EXEC SYS.KILLSID \($1,$2,$3\)
. matches newline
Explicação:
^ : begining of line
(\d{1,4}) : group 1, 1 to 4 digits
\D+ : 1 or more non digits
(\d{4,5}) : group 2, 4 or 5 digits
.+ : 1 or more any character but newline
(\d) : group 3, 1 digit
$ : end of line
Substituição:
EXEC SYS.KILLSID : literally
\( : open parenthesis, in Npp, it has to be escaped
$1 : content of group 1
, : a comma
$2 : content of group 2
, : a comma
$3 : content of group 3
\( : close parenthesis, in Npp, it has to be escaped
Resultado para o exemplo dado:
EXEC SYS.KILLSID (1200,29489,2)