Group Constructs

Pattern Description
(...) Capture everything enclosed
(a|b) Match either a or b
(?:...) Match everything enclosed
(?>...) Atomic group (non-capturing)
(?|...) Duplicate subpattern group number
(?#...) Comment
(?'name'...) Named Capturing Group
(?<name>...) Named Capturing Group
(?P<name>...) Named Capturing Group
(?imsxXU) Inline modifiers
(?(DEFINE)...) Pre-define patterns before using them
Comments