Assuming the text
text = """{ |p{3cm}|p{3cm}|p{3cm}| } \hline \multi{3}{|c|}{City List} \ \hline Name ... """
I would solely like to subset the content of the first curly brackets. So the desired output would be:
desired_output = "p{3cm}|p{3cm}|p{3cm}"
Currently I receive the content of all curly brakets of the lines
text = """{ |p{3cm}|p{3cm}|p{3cm}| } \\hline \\multi{3}{|c|}{City List} \\ \\hline Name ... """
import re
false_output = re.findall(r'\{(.*?)\}',text)
false_output
#[' |p{3cm', '3cm', '3cm', '3', '|c|', 'City List']
#also no success with:
re.findall(r'({\w+\})',a)