いくつかのhtmlエンティティを含む文字列があります
<listing name="name goes there" phone="321321" >Text description</listing>
<anytag name="another name" phone="any phone" attr1="value 1" attr2="value 2">any can be written where ©MyRight</anytag>
<anytag name="another name line 2" phone="65851566" attr1="value ë" attr2="value 2">any can be written where ®MyRightëous</anytag>
PHPの単一の正規表現でこれらの要素のすべての属性を取得したいのですが、
試しHtmlDom
てみるとエラーが発生し、undefined tags
使用するSimpleXml
とhtmlエンティティの解析が拒否されます。
だから私はRegExpを試してみましたが、その解決策を見つけることができませんでした。
RegExp以外のソリューションも歓迎します。