You are here: PSPad forum > English discussion forum > Re: How can i delete lines that begins with the same string ?

Re: How can i delete lines that begins with the same string ?

#1 How can i delete lines that begins with the same string ?

Posted by: Esgrimidor | Date: 09/12/2017 22:35 | IP: IP Logged

HOw can i deleted lines that begins with a proposed same string ?

Best Regards

--
Nice program indeed

Options: Reply | Quote | Up ^


#2 Re: How can i delete lines that begins with the same string ?

Posted by: vbr | Date: 09/13/2017 00: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

Options: Reply | Quote | Up ^


#3 Re: How can i delete lines that begins with the same string ?

Posted by: Esgrimidor | Date: 09/16/2017 23:51 | IP: IP Logged

Thanks a lot.

--
Nice program indeed

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2017 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák