Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文字列からhtmlタグを取得したい。
私はこの正規表現を試しました:
"<[\r\n ]*/?[\r\n ]*(.*?)[\r\n ]*/?[\r\n ]*>"
しかし、それは私にも与えています:
< / table />
私はそのような間違ったタグを望んでいません。
</?[^>/]*>|<[^>/]*/>またはを試してください</?[^>/]+>|<[^>/]+/>。グーグルもあなたの友達です。
</?[^>/]*>|<[^>/]*/>
</?[^>/]+>|<[^>/]+/>