You are here: PSPad forum > English discussion forum > How can i delete lines that begins with the same string ?
Posted by: Esgrimidor | Date: 2017-09-12 20:35 | IP: IP Logged
HOw can i deleted lines that begins with a proposed same string ?
Best Regards
--
Nice program indeed
Posted by: vbr | Date: 2017-09-12 22:10 | IP: IP Logged
Esgrimidor:HOw can i deleted lines that begins with a proposed same string ?Best Regards
Hi,
if you just want to delete the content of all lines starting with some given string, you can use regular expression replace (Ctrl+H), e.g.:
^Beginning_of_a_useless_line.*$
replace using regex with an empty string.
^matches at the beginning of the line
$ matches at the end of the line
. matches any character except of newline
* is a quantifier for "any number" - zero or more - of the preceeding element
note that in PSPad, you currently can't match the whole line including the newline character at the end, hence, after a replacement above you get an empty line but the ending newline stays there.
hth,
vbr
Posted by: Esgrimidor | Date: 2017-09-16 21:51 | IP: IP Logged
Thanks a lot.
--
Nice program indeed
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