How to use conditionals when replacing in Notepad++ via regex
The syntax in the conditional replacement is (?{GROUP_MATCHED?}REPLACEMENT_IF_YES:REPLACEMENT_IF_NO) The { and } are necessary to avoid ambiguity when you deal with groups higher than 9 and with named capture groups. Since Notepad++ uses Boost-Extended Format String Syntax, see this Boost documentation: The character ? begins a conditional expression, the general form is: ?Ntrue-expression:false-expression where N … Read more