2
2
2B2TL2020-06-04 21:58:17
Regular Expressions
2B2TL, 2020-06-04 21:58:17

How to remove a part from found?

There are lines like:

[email protected]: 161 361 361: 1251136136
[email protected]: 2361251251225: -
[email protected]: 215,125,151,251,252: 135,263,623.13631535315

There's an expression:
(* * *..) (*. $)

but it looks for the entire line and I need to remove everything from the end of the line up to : leaving
[email protected]:______

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dodo512, 2020-06-04
@2B2TL

Find: (^.*:.*):(.*$)
Replace: $1
https://regex101.com/r/d9KxE7/2
Or ^.*:.*\K:.*$, and leave the replacement string empty.
https://regex101.com/r/d9KxE7/3

D
Dmitry Derepko, 2020-06-04
@xEpozZ

(^.*:.*):.*$

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question