简体   繁体   English

notepad ++删除不包含空格的文本

[英]notepad++ remove a text that not contains spaces

I have a string such as "brown,Ceilings,flu,hydraulic bar stool,horse saddles,marble tiles" . 我有一个字符串,例如"brown,Ceilings,flu,hydraulic bar stool,horse saddles,marble tiles" I want to remove the text that does not contain spaces, but keep the text that has at least one space. 我要删除不包含空格的文本,但要保留具有至少一个空格的文本。 The result should be like hydraulic bar stool,horse saddles,marble tiles . 结果应该像hydraulic bar stool,horse saddles,marble tiles

I'm stuck at [^,]*\\s and still how to figure out the problem.. 我被[^,]*\\s困住了,仍然如何解决问题。

How about: 怎么样:

Find what: (^|,)\\w+, 查找内容: (^|,)\\w+,
Replace with: $1 替换为: $1

Make sure Regular Expresion is checked. 确保选中“ Regular Expresion

How about 怎么样

(^|,)[^ ,]+(,|$)

Replace with 用。。。来代替

\1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM