How can I use regular expressions in Textpad to remove anything, line by line, after specified characters?

Deadly 提交于 2020-01-15 11:58:06

问题


Suppose I have the following text in Textpad:

kwejkewrjl:ksajdlakj

e833ekjh:skdjkahak

2098e123809:ksjdkas

dkjwhfdkjqhio:skjddksjal

98a09asfdsaok:kwqjeo912ui

I would like to remove all characters from each line that occur after the colon. The new text should be:

kwejkewrjl:

e833ekjh:

2098e123809:

dkjwhfdkjqhio:

98a09asfdsaok:

回答1:


How about this?

Find:

:.*

Replace with:

:

Just did this in TextPad on one of my servers.



来源:https://stackoverflow.com/questions/18858334/how-can-i-use-regular-expressions-in-textpad-to-remove-anything-line-by-line-a

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!