摘要: 1,取出空行:1,$g/^$/d2,去除段首的空格3,添加多行注释:2,50 s/^/#/g 在2~50 行首添加 # 号注释4,取消多行注释:2,50 s/^#//g 在2~50 行首添加 # 号注释5,去除微博中的短链接,只用sed语句cat 团圆饭.sample | sed -n -i '1,$s/http:\/\/t\.cn\/[a-zA-Z0-9]\{7\}//g' 使用java语句:Pattern pattern = Pattern.compile("http://t.cn/[a-zA-Z0-9_]{7}"); Matcher matcher = 阅读全文
posted @ 2014-02-21 10:53 bobo的学习笔记 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 原始文件格式说明:新浪微博sina_weibo.data: 關鍵詞 微博id 用户id 微博url 創建時間 内容 頭像url 視頻url 音樂url 發博來源 轉發數 評論數 贊數 所轉發微博id 所評論微博id(目前都是0) 抓取時間 微博大V新浪微博:微博id 用户id 微博url 創建時間 内容 頭像url 視頻url 音樂url 發博來源 轉發數 評論數 贊數 所轉發微博id 所評論微博id(目前都是0) 抓取時間 新浪用户信息: 用户id 昵稱 property domainname 性别 描述 用户類型 認證原因 location 省份/城市 null 圖片ur... 阅读全文
posted @ 2014-02-21 09:29 bobo的学习笔记 阅读(328) 评论(0) 推荐(0) 编辑