delete everything between two markers

J

John Smith

Is it possible to delete everything between two markers? Say I
have a file containing something like the following,

[marker1]

something here, could be several paragraphs

[marker2]

How to:
a) delete everything between the two markers but not the markers
themselves?

b) delete everything between, and including, the two markers?
 
T

Tony Jollans

You can use Find and Replace with Wildcards

Find ([Marker1])*([Marker2])
Replace \1\2 (or lave replace blank to completely delete

Note that (square) brackets have special meaning when using wildcards so if
you have actual brackets in your marker texts you will need to 'escape'
them - enter \[ for a left bracket character and \] for right bracket
character.
 
Top