我在新行上有文字,如下所示:
tom
tim
john
will
tod
hello
test
ttt
three
我想删除每三行所以使用上面的例子我想删除:
john,hello,three
我知道这需要一些正则表达式,但我不是最好的!
我试过的:
Search: ([^\n]*\n?){3} //3 in my head to remove every third
Replace: $1
我尝试过的其他人只是尝试使用
\n\r
等。同样,使用正则表达式并不是最好的。我认为上述尝试有点接近。
最佳答案
gedit ubuntu
搜索:(.*?)\n(.*?)\n(.*)\n
替换为:\1\n\2\n
关于regex - 如何删除Notepad++上的每三行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42365646/