我正在尝试在 php 中解析一串 HTML 标记属性。可能有3种情况:
attribute="value" //inside the quotes there can be everything also other escaped quotes
attribute //without the value
attribute=value //without quotes so there are only alphanumeric characters
有人可以帮我找到一个正则表达式,它可以在第一个匹配属性名称和第二个匹配属性值(如果存在)中获得?