hpricot を使用してスクリプト要素以外のすべてを選択する CSS セレクターを作成しようとしています。select-me div のすべてのコンテンツを簡単に選択してスクリプト要素を削除できますが、セレクターを使用できるかどうか疑問に思っていました。スクリプト要素を除外します:
<div class='select-me'>
<p>This is some text</p>
<script>
javascript would be here
</script>
<p>This is some text</p>
</div>
だから最後に私は戻ってきます:
<div class='select-me'>
<p>This is some text</p>
<p>This is some text</p>
</div>
乾杯