You are here: PSPad forum > English discussion forum > delete all lines with "<Untitled>"

delete all lines with "<Untitled>"

#1 delete all lines with "<Untitled>"

Posted by: hlk123 | Date: 2018-07-26 18:28 | IP: IP Logged

Hello

I've a text file .. which contents look like this:
.
.
Major Scale – Form \#3; 276
Major Scale – Form \#4\n ; 277
<Untitled>; 277
Modes; 279
<Untitled>; 280
The Road to Lisdoonvarna; 282
<Untitled>; 283
The Battle of Aughrim; 285
Scalloway Lasses; 287
The Swallow Tail Jig; 289
Three more “minor” modes; 291
Ionian – Dorian – Phrygian – Lydian – Mixolydian – Aolian – Locrian; 293
More Scales; 293
<Untitled>; 293
Whole Tone Scale\n ; 294
<Untitled>; 295
Pentatonic Study based on “My Girl” Intro\n ; 295
.
.

I want to delete all lines with " <Untitled>; nnn" in them.
Maybe with Regular Expression....?
But ... I (still) cannot Regex ... sad smiley
Can someone help me?
Thank you.

Options: Reply | Quote | Up ^


#2 Re: delete all lines with "<Untitled>"

Posted by: vbr | Date: 2018-07-26 19:40 | IP: IP Logged

hlk123:
Hello

I've a text file .. which contents look like this:
.
[...]
.

I want to delete all lines with " <Untitled>; nnn" in them.
Maybe with Regular Expression....?
But ... I (still) cannot Regex ... sad smiley
Can someone help me?
Thank you.

Hi, you can delete the content of such lines with regex search and replace (Ctrl+H) for:
^.*<Untitled>; \d+.*$
replacing with
empty string
however, the blank line (the newline only) still remains in the text. If there are no meaningful blank lines in the text, these ones can be removed via Edit - lines manipulation - delete empty lines.
Alternatively, for smaller files, one can search for that regex Ctrl+F, F3 and hit delete twice on each match.

hth,
vbr

Options: Reply | Quote | Up ^


#3 Re: delete all lines with "<Untitled>"

Posted by: pspad | Date: 2018-07-27 04:38 | IP: IP Logged

Hello

Another possibility:
Search/replace dialog
Search for (normal search, not regular expressions): <Untitled>;
Check [x]Nonmatching
Press COPY button

It will copy all lines what doesn't contains "<Untitled>;" into new tab

Options: Reply | Quote | Up ^






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