Page 1 of 1

Replace from a word through 9 lines

Posted: Mon Jan 09, 2012 9:11 pm
by bbri
I would like to find an expression and then delete the line it is on and the following 9 lines.

Example:

Warehouse: 1001

Qty sold: 100
Profit: 100
COG: 100


Qty Rtrn
Qty canc
Sold

Lines I want to keep...

I would like to replace the "Warehouse" line and the next 9 lines that could change.

Any help would be greatly appreciated.

Posted: Tue Jan 10, 2012 8:48 am
by ben_josephs
Find what: ^Warehouse: .*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n
Replace with: [nothing]

[X] Regular expression

Replace All

Thanks!

Posted: Tue Jan 10, 2012 1:36 pm
by bbri
Worked perfect. Thank you!