/<(?P<tag>[A-Z][A-Z0-9]*)\b[^>]*>.*?<\/(?P=tag)>/
/<([A-Z][A-Z0-9]*)\b[^>]*>.*?<\/\1>/
"<" Capture { Regex { ("A"..."Z") ZeroOrMore { CharacterClass( ("A"..."Z"), ("0"..."9") ) } } } Anchor.wordBoundary ZeroOrMore(.anyOf(">").inverted) ">" ZeroOrMore(.reluctant, .any) "</" /* TOOD: backreferences */ ">" }
/(?(?=regex)then|else)/
/<([A-Z][A-Z0-9]*)\b[^>]*>.*?<\/\2>/
Cannot parse regular expression: no capture numbered 2
(edited)/<(?P<tag>[A-Z][A-Z0-9]*)\b[^>]*>.*?<\/(?P=tab)>/
^ コンパイルエラー Cannot parse regular expression: no capture named 'tab'
(edited)-enable-bare-slash-regex