【发布时间】:2017-05-14 14:08:57
【问题描述】:
我能够以这种方式从server{"html":"response header <!doctype html>MY Intrest is this HTML Block<html></html>"}得到回复
我想删除类似于 HTTP\/1.1 200 OK\r\nDate 的 response header 直到找到 <!doctype html>
这是我的示例数据:
{"html":"HTTP\/1.1 200 OK\r\nDate: Fri, 30 Dec 2016 07:33:08 GMT\r\nExpires: -1\r\nCache-Control: private, max-age=0\r\nContent-Type: text\/html; charset=ISO-8859-1\r\nP3P: CP=\"This is not a P3P policy! See https:\/\/www.google.com\/support\/accounts\/answer\/151657?hl=en for more info.\"\r\nServer: gws\r\nX-XSS-Protection: 1; mode=block\r\nX-Frame-Options: SAMEORIGIN\r\nSet-Cookie: NID=93=ntWba1QpElyHkWL02fhHB6zujRcM8Sb6dfSww39vgUSaNOg6ya2e6PCZ2BA1zYhP2w9qeCy8X416oWKhHKfBAa17kEgNiRoSU0kMbRfuyVtahTUYDpCqS7knxRPhYSyei3MpXIakXU9BepA; expires=Sat, 01-Jul-2017 07:33:08 GMT; path=\/; domain=.google.com; HttpOnly\r\nAccept-Ranges: none\r\nVary: Accept-Encoding\r\nTransfer-Encoding: chunked\r\n\r\n<!doctype html><!-- THIS WHAT I WANT --><\/html>"}
如何删除这个response header?
我的预期输出:<!doctype html><html>content goges here</html>
【问题讨论】:
-
你想提取字符串“content goges here”
-
@codeMan,你说得对,这正是我要找的
-
这是一个有效的问题,为什么
down vote ?任何原因
标签: javascript jquery node.js