还有个比较蠢的方法。
用 javascript 就能实现了。
http://www.cev.washington.edu/lc/CLWEBCLB/jst/js_string.html
比如说你的内容是。
title : testing content
content: the content.
title : testing content 1
content: the content 1.
那么你把你的内容写进 javascript array
- [
- {title: "testing title", content: "testing content"},
- {title: "testing title 1", content: "testing content 1"},
- ]
复制代码然后就 forloop array, 用 js 的 match() function, 或 indexof() 来找。
符合到的话, 就 print 出来。
搞定, 收工!