First, as the arc said. will not match \ n unless you activate Pattern.DOTALL, but like Petter M, you must use m.find (), otherwise it will not match.
Then you can use this other expression if for some reason you cannot work with Pattern.DOTALL.
FILES_SECTION (: |?. \ S) * FILES_SECTION
(Note: I am using a non-capturing group for characters between FILES_SECTION delimiters).
source share