HTML タグに含まれるテキストを抽出したいと考えています。例えば:
<html><body>this is a warning message. wrongs values</body></html>
結果は、すべての HTML タグを無視してメッセージを取得する必要があります。
誰か提案はありますか?
正規表現を使用してHTML タグを削除できます。
str = '<html><body>this is a warning message. wrongs values</body></html>';
str2 = regexprep(str, '<[^>]*>', '')
次のようなものが必要です。
a = sscanf('<html><body>this is a warning message. wrongs values</body></html>','<html><body>%[a-zA-Z., ]</body></html>')