notepad++ Regex Capture Groups


A regex in Notepad++ may have as many capture groups as desired.

(one)(two)(three)...(nine)(more than nine groups!)...

Anonymous capture groups use the standard syntax:


Named capture groups may use either of following syntax formats:



Anonymous and named capture groups may be mixed in any order:


Capture groups are numbered starting from 1 based on the order of their opening parenthesis', regardless of nesting:

((group 2) group 1)

Note that named groups are included in the numbering:

(group 1)(?<name>group 2)(group 3)