Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\\^'">\\s]+))?)+\s*|\s*)\/?>
/
g

Description

通过下面的表达式可以匹配出HTML中的标签属性。

Submitted by anonymous - 7 years ago