Can anyone tell me what this bit of regex does?
</?[a-z0-9-=""'!\$\?%&\*\+@~##;,\开发者_高级运维\]*:[a-z0-9 -=""'!\$\?%&\*\+@~##;,\\]*>
My regex is not the best.
It matches sgml elements with namespace (start tags and end tags). Please note that this regex also matches elements without a name and/or namespace. But this regex will never match empty tags.
Will match:
<:>
,
</:>
,
<abc:abc019>
Will not match
<hello>
,
</abc>
,
<abc:abc019 />
,
<abc />
Finds a <
, an optional /
, zero or more of a bunch of characters, a :
, zero or more of a bunch of characters, and a >
.
精彩评论