how deleting paragraphs?

Find, replace, find in files, replace in files, regular expressions

how deleting paragraphs?

Postby jogi » Wed Feb 15, 2006 7:04 pm

Hallo,

How can I search paragraphs in a directory with html-files and delete them? How to replace?
Is there a command?

thanks
User avatar
jogi
Newbie
 
Posts: 1
Joined: Wed Feb 15, 2006 12:00 am

Re: how deleting paragraphs?

Postby Bego » Thu Feb 16, 2006 7:02 am

Hi,

in the search menu use "replace in files".
Simply search for your string and replace it with "nothing".
file-filter is "*.htm*"

rds Bego
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany

Re: how deleting paragraphs?

Postby Mofi » Thu Feb 16, 2006 9:19 am

Because you want to delete a whole paragraph (multiline string), you have to use ^p (DOS files) or ^n (Unix files) as placeholder for every line break in the find string.

You could also open one of the files and select the paragraph. Then open the Replace In Files dialog and the selected paragraph will be automatically pasted in the find field with small rectangle characters which are the CR and LF characters.

If your paragraph is too large (more than 1023 characters) you have to copy the selected paragraph to the clipboard and use ^c in the find field of the Replace In Files dialog.

Regular expression search must be unchecked for all 3 methods!
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Find/Replace/Regular Expressions