Python Regex - Extract text between (multiple) expressions in a textfile
问题 I am a Python beginner and would be very thankful if you could help me with my text extraction problem. I want to extract all text, which lies between two expressions in a textfile (the beginning and end of a letter). For both, the beginning and the end of the letter there are multiple possible expressions (defined in the lists "letter_begin" and "letter_end", e.g. "Dear", "to our", etc.). I want to analyze this for a bunch of files, find below an example of how such a textfile looks like ->