You are here: PSPad forum > English discussion forum > How to remove special text?
Posted by: Dirk | Date: 2013-05-15 06:25 | IP: IP Logged
How can I remove all the text in a txt file from the beginning of each line to the last ":" in one step or a few clicks or so?
For example (one line, there are about 1000 lines):
I:\Eigene Dateien\xxxx\yyyy\aaaa\abc.eml : OECustomProperty (913 bytes)
The bold text shall be kept, the colored text shall be removed (the color appears not to work, so this text keep:
"I:\Eigene Dateien\xxxx\yyyy\aaaa\abc.eml"
Edited 1 time(s). Last edit at 2013-05-15 06:37 by Dirk.
Posted by: pspad | Date: 2013-05-15 08:40 | IP: IP Logged
Search/Replace with regular expressions
Search: ^.* (: )
Replace: $1
[x]Regular expresions
you are looking for anything .* from the begin of line ^ up to space:space
you want to preserver your :, so we enclose it with brackets (: ) and return back in replace expression as first brackets content $1
Posted by: Dirk | Date: 2013-05-15 18:33 | IP: IP Logged
Many thanks.
Works perfectly.
I hope, I am able to use your template lines and explanation for may be slight changes if need be.
Thank you again.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR