perl を使用して複数行の文字列を解析しようとしていますが、一致する数しか得られません。これが私が解析しているもののサンプルです:
<div id="content-ZAJ9E" class="content">
Wow, I love the new top bar, so much easier to navigate now :) Anywho, got a few other fixes I am working on as well. :) I hope you all like the new look.
</div>
このコードを使用して、コンテンツを文字列に格納しようとしています:
@a = ($html =~ m/class="content">.*<\/div>/gs);
print "array A, size: ", @a+0, ", elements: ";
print join (" ", @a);
print "\n";
ただし、div 内のテキストだけでなく、すべてを返します。誰かが私の正規表現のエラーを指摘できますか?
魔理沙