Answers:
^(\d{1,4})\D+(\d{4,5}).+(\d)$
EXEC SYS.KILLSID \($1,$2,$3\)
. matches newline
说明:
^ : 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
替换:
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
给出示例的结果:
EXEC SYS.KILLSID (1200,29489,2)