/
^
(?P<group>
(?P<structured>
(?P<single>
(?P<tag_first>
(?P<tag>
\d+(?:\/\d+)+
|
(?P<repnum>\$+(?:@\^*-?\d*)?)
|
[\w:!-]
)++
(?P<attr>
(?P<short_attr>
\.
(?P<short_val>
(?P>repnum)
|
[\w:!-]
)*
|
\#(?P>short_val)*
)
|
(?P<long_attr>
\[
(?P<attr_pair>
(?P<attr_name>
\\(?:\\{2})*["'\s]
|