Reputation: 645
So I have a file like:
FLAGSHARE
xxxxxx
xxxxx, 1 2015
words....
FLAGSHARE
xxxxxx
xxxxx, 2 2015
words....
FLAGSHARE
xxxxxx
xxxxx, 3 2015
words....
etc.etc.
How would I be able to delete the three lines FLAGSHARE, xxxxxx, xxxxx, * 2015 (essentially remove FLAGSHARE, 2015 and lines between FLAGSHARE and 2015) using Notepad++?
Upvotes: 4
Views: 1597
Reputation: 14361
You can also use:
FLAGSHARE[\S\s]*?\d{4}
Which will also match any year
You could also use:
FLAGSHARE[\S\s]*?20\d{2}
For any year int he format: 20**
Or even:
FLAGSHARE[\S\s]*?\d\s*\d\n
Which will work in all situations
Upvotes: 0
Reputation: 13640
You can use the following to match:
FLAGSHARE[\s\S]*?2015
And replace with ''
(empty string)
See DEMO
Upvotes: 5