BaNg@taobao

Just Do It!

  语源科技BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  20 Posts :: -1 Stories :: 202 Comments :: 0 Trackbacks
表达式: /\*{1,2}[\s\S]*?\*/

对应语言注释 /* a lot of words */ 或文档注释 /** more words */
其中 *因为是regular expression的meta word,需要转义。
Eclipse中的查找是不能设置单行或者多行的,即DOT . 不包含 \r \n,所以\s代替,?表示非贪婪,即碰到注释结束 */ 要停止

posted on 2012-02-02 17:25 Always BaNg. 阅读(2623) 评论(0)  编辑  收藏 所属分类: Eclipse