I'm new to Python and I'm still learning about regular expressions. I want to get a paragraph between two key words; something like this:
Beginning of the text
Keyword1
Paragraph content
Keyword2
End of the text
How could I do it? I've tried this:
(?i)Keyword1(.*?)((?i)Keyword2Variant1|(?i)Keyword2Variant2)
But it doesn't really work.