Reputation: 61
I have a text like this
0367118 06 - 10 000071
Bank sl. no beginning with an 'IA' indicates ICB account
Paramount Textile Limited Page No: 113 of 258
Lottery Conducted by--Dept. of Electrical and Electronic Engineering, BUET. Date:03/10/2013
General
Applicants
0367121 06 - 10 000074
want make it like this in Notepad++ using replace and regular expression
0367118 06 - 10 000071
0367121 06 - 10 000074
want to replace all between two word Bank and Applicants and also those word too with none.
Upvotes: 2
Views: 10003
Reputation: 21
Bank.*Applicants
does work except unchecking "matchs new line", so what you need to do is to check this box. I test it on Notepad ++ 6.4.5.
Upvotes: 2
Reputation: 5271
I think you are looking for a more generic solution than specifically replacing on the words "Bank" and "Applicants". Otherwise, you would do this manually.
So here's how to search for that type of code and replace what's in between:
Find: (\d+ \d+ - \d+ \d+\r\n).*?(\d+ \d+ - \d+ \d+\r\n)
Replace: \1\2
Be sure you are using the "regular expression" mode, with ". matches newline" checked.
Upvotes: 0
Reputation: 3371
var result = text.replace(/(.*)Bank.+Applicants(.+)/, function(m,p1,p2) { return p1+p2;});
Upvotes: 0
Reputation: 677
i think you want to do some programatically
This may be help you :
Upvotes: 0
Reputation: 4622
Just open replace dialog window.
Select Regular expression and tick . matches newlines.
Into find what type: Bank.*Applicants
Click replace all.
Upvotes: 0