【发布时间】:2010-11-05 06:30:49
【问题描述】:
我在 XHTML 文档中有以下内容:
<script type="text/javascript" id="JSBALLOONS">
function() {
this.init = function() {
this.wAPI = new widgetAPI('__BALLOONS__');
this.getRssFeed();
};
}
</script>
我正在尝试选择两个脚本标签之间的所有内容。如果有帮助,id 将始终是 JSBALLOONS。我知道如何选择包括脚本标签的内容,但我不知道如何选择不包括脚本标签的内容。正则表达式的结果应该是:
function() {
this.init = function() {
this.wAPI = new widgetAPI('__BALLOONS__');
this.getRssFeed();
};
}
【问题讨论】:
-
您好,我的感谢被版主删除了!?!仅供参考,这篇文章的结尾曾经包括:谢谢,皮特。我不喜欢版主挑剔我的帖子,尤其是删除我的礼貌。
标签: javascript regex parsing xhtml html-parsing