开发者

What the Regex?

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 >.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜