Regular Expressions Regex modifiers (flags) Explicit Capture modifier


This is a .NET regex specific modifier expressed with n. When used, unnamed groups (like (\d+)) are not captured. Only valid captures are explicitly named groups (e.g. (?<name> subexpression)).


will match the whole 123-1_abc-00098, but (\d+) and (\w+) won't create groups in the resulting match object. The only group will be ${id}. See demo.