摘要: vi统计某个匹配出现的次数::%s/hello world/&/gn上句统计hello world 在全文出现的次数。如果要统计从50行到100行,出现的次数,则使用::50,100s/hello world//gn 阅读全文
posted @ 2014-03-06 10:56 taotaowill 阅读(5336) 评论(0) 推荐(0) 编辑
摘要: escape = function(text){var REGX_HTML_ENCODE = /"|&|'||[\x00-\x20]|[\x7F-\xFF]|[\u0100-\u2700]/g;return text.replace(REGX_HTML_ENCODE, function($0){ var c = $0.charCodeAt(0), r = ["&#"]; c = (c == 0x20) ? 0xA0 : c; r.push(c); r.push(";"); return r.join("&quo 阅读全文
posted @ 2014-03-06 10:00 taotaowill 阅读(367) 评论(0) 推荐(0) 编辑