问题
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