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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top