Notepad ++ - 搜索不以" \ r结尾的高架线

时间:2017-04-13 01:13:30

标签: regex notepad++

我在Notepad ++工作,我正在寻找解决我遇到的问题的方法。 我需要使用正则表达式检查几十行代码。

基本上,我需要检查任何提升的行(3-tabbed)以括号和换行符结尾。 (" \ r)的

以下是代码示例:

error[E0277]: the trait bound `fn(i32): std::fmt::Display` is not satisfied
   --> testzz.rs:20:16
   |
20 | println!("{}", R);
   |                ^ the trait `std::fmt::Display` is not implemented for 
    `fn(i32)`
   |
 = note: `fn(i32)` cannot be formatted with the default formatter; try using 
`:?` instead if you are using a format string
  = note: required by `std::fmt::Display::fmt`

您可以看到Material行缺少括号。我需要一种方法来找到缺少它们的这些线。

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

^\s+".*(?<!")$\r\n

此表达式查找以下行:

  • 以空格开头,后跟"
  • "和换行符(\r\n
  • 结束