Branch based on whether a group matched.
Section: PCRE and Advanced Features
Conditional expression
regex
regex
^(?:(<))?\w+(?(1)>)$Explanation
Useful for optional paired delimiters in PCRE-like engines.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing PCRE and Advanced Features