user1729506
user1729506

Reputation: 975

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

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:

Upvotes: 2

Views: 20439

Answers (1)

Leptonator
Leptonator

Reputation: 3519

How about this?

Find:

:.*

Replace with:

:

Just did this in TextPad on one of my servers.

Upvotes: 5

Related Questions