-4

我有这个代码:

。班级 {
}

我想在整个文件中删除这些行(它的长度为 6k 行)。我怎样才能做到这一点?

4

1 回答 1

0
  • Ctrl+H
  • 找什么:^[^{\r\n]+\{\R\}
  • 用。。。来代替:EMPTY
  • Replace all

确保您已检查Regular expression

解释:

^           : start of string
  [^{\r\n]+ : 1 or more character that is not left curly brace or line break
  \{        : left curly brace, must be escape as it is a special character
  \R        : any kind of line break
  \}        : right curly brace, must be escape as it is a special character
于 2016-11-20T16:02:57.077 回答