Page 1 of 1

Delete multiple lines

Posted: Thu Oct 13, 2005 9:34 am
by borly
Is possible to delete multiple lines.

Example:
hello adsfas asdfas fasdf asdfsad
a sdfasd fasdf asdfdsfglklghdfgh
dfgh dfghdfghdfghdfh dghfdgh dfg

dfghfghd fgh dfg
dfgh dfgh dfg
bye

asdfasd fasd

anybody know the regular expresion to delete from hello to bye.???

Posted: Thu Oct 13, 2005 9:56 am
by Abacre
Hi,

Yes, it's possible.

To to main menu - Action - Batch replace and
check ON: "Modifier S". So the regular expressions will handle multiple
lines at once.

Then in main window go to Batch replace tab.
Check ON: "Use regular expressions".
Put into Search for:
hello.*bye

Replace with:
should be empty, because you delete the text.

One note:
in your case hello and bye are placed at the beginning of the lines.
In regular expressions begin of line is ^ char.

So for more reliability (for example theoretically bye maybe placed
somewhere in the middle of the text) you should use:
Search for:
^hello.*^bye

Replace with:
should be empty, because you delete the text.

Read more about syntax of r.e.:
http://www.abacre.com/afr/manual/regexpsyntax.htm
Use Regular Expression Builder (in Batch replace tab) for testing.


PS instead of using r.e. you may also use Between action of Replace
operation.