Extracting text between two strings
-
Hi.
I have many files containing raw data and all files contain certain information between two constant strings.E.g.
Info in 1st file
Going to Hawaii?
Try this all in one package including fight tickets
Hotel stay in Honolulu
extra bed for kids
Beach excursion
Free meals
Book nowInfo in 2nd file
Going to Hawaii?
Try this customized package
Hotel stay with free breakfats
extra bed with extra charges
meals at Menu rates minus 20%
paid car rentals
Book nowIf I have to extract data between the strings “Try this” and “Book now” , how can I do this in Notepad++?
I am new to Notepad++ as well as to coding. So please guide me in simple way.
-
You can “mark” the text and then copy the marked text.
Here’s an example of how to do that:Find:
(?s)Try this \K.*?(?=Book now)
Press Mark All to get:
Press Copy Marked Text.
-
Thanks. It helped. :)