I'm trying to extract a certain part of the text from a file. I'm having trouble making the regular expression match the least number of characters as possible.
Here is an example text file.
UNIQUE
sdkjbskdfb....
UNIQUE
lnasdljnkjn......
UNIQUE
*Text from here is needed*
UNIQUE2
*Text from here is needed*
UNIQUE
My best effort was this. "UNIQUE(.\*?)UNIQUE2(.\*?)UNIQUE"
Unfortunately this matches the whole thing because it uses the first UNIQUE value instead of the third one.
