[英]Notepad++ remove carriage return between two words
I have some text in a file eg 我在文件中有一些文字,例如
CREATE
INDEX TST_NK ON TST.TEST_DIM
(
TSL_ID
)
DEFER NO ;
CREATE
INDEX TST_NK ON TST.TEST_DIM
(
TSL_ID,
DES_ID
)
DEFER NO ;
I want to remove all return characters between CREATE and ; 我想删除CREATE和;之间的所有返回字符。
In notepad++ i'm able to search this text using regex CREATE\\b(.+?); 在记事本++中,我可以使用正则表达式CREATE \\ b(。+?)来搜索此文本; however i'm not sure how to replace the return characters in this text so that i can have all the create statements in single line. 但是我不确定如何替换此文本中的返回字符,以便可以将所有create语句放在一行中。
Find what: 找什么:
(?<=[^\s;])\s*\n\s*
Replace with: (single space) 替换为:(单个空格)
Then hit Replace All 然后点击全部替换
It will search for any sequence of space character, where there is at least one new line character for replacement. 它将搜索任何空格字符序列,其中至少有一个换行符要替换。 The look-behind is used to make sure that there is no ;
后向用于确保不存在任何内容;
in front of such sequence. 在这样的序列前面。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.