I want to parse the following part of a .tex file
\section{a}
some random lines with lot
of special characters
\subsection{aa}
somehthing here too
\section{b}
I want the content within \section{a} and \section{b} inclusive so i tried the following code in python
import re
a="my tex string mentioned above"
b=re.findall(r'\\section{a}.*\\section{b}',a)
print(b)
but i got b=[]. Where I am wrong?