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
最初に属性名と一致し、2番目に属性値(存在する場合)を取得できる正規表現を見つけるのを誰かが手伝ってくれますか?