如何删除某个字符后的所有内容?(记事本++) [英] How to remove everything after a certain character? (notepad++)
本文介绍了如何删除某个字符后的所有内容?(记事本++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要删除某个字符后的所有内容.例如在以下行中:
I need to remove everything after a certain character. For example in the following line:
email:pass | text | text | text | text
我将如何删除 "pass"
之后的所有内容,使其最终像这样:
How would I remove everything past the "pass"
so it ends up like this :
email:pass
先谢谢你!
推荐答案
做一个查找替换(用空替换)这个正则表达式:
Do a find replace (replacing with nothing) this regex:
\|.*
有关说明,请参阅 https://regexr.com/3rq9m.
这篇关于如何删除某个字符后的所有内容?(记事本++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文