I know this has been discussed many times, but I've tried so many methods of getting my regex to read info from multiple lines and none works. Here is what I am trying to do:
I have a text file. Inside of it reads:
Description1 This is a test description. Yay. Description2
The regex (?<=Description1\\s).*(?=\\sDescription2) works as intended in returning all text between, but not including the words Description1 and Description2.
However, I need to be able to do the same, even if the text in between is separated by another line. like so.
Description1 This is a
test description. Yay. Description2
I've tried everything I can find, from the Pattern.MULTILINE flag, to Pattern.DOTALL, to adding (?s) to the beginning, to adding [/r/n], nothing seems to work.
Any helps would be appreciated. This is a small step to a much bigger personal project.