我在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行缺少括号。我需要一种方法来找到缺少它们的这些线。
感谢您的帮助!
答案 0 :(得分:0)
^\s+".*(?<!")$\r\n
此表达式查找以下行:
"
"
和换行符(\r\n
)