Added getAllTextBetweenPatternsIgnoringSections function