如何在 Notepad++ 中找到所有包含一个(或多个)空格 space(s) 的单词?
How to find all words that have one (or more) blank space(s) in them in Notepad++?
这是一个示例,所有行都已修剪前导和尾随空格。
word word
word word word
word word word word
word
结果将是
word word
如果你想找到只有一个 space 的行(前后有一些 'word'),试试这个:
^\S+ \S+$
解释:
^ # Begin of line
\S+ # non-blank character repeated 1 or more times
[ ] # a space (I'm using [ ] to make it more clear)
\S+ # non-blank character repeated 1 or more times
$ # end of line
这是一个示例,所有行都已修剪前导和尾随空格。
word word
word word word
word word word word
word
结果将是
word word
如果你想找到只有一个 space 的行(前后有一些 'word'),试试这个:
^\S+ \S+$
解释:
^ # Begin of line
\S+ # non-blank character repeated 1 or more times
[ ] # a space (I'm using [ ] to make it more clear)
\S+ # non-blank character repeated 1 or more times
$ # end of line