what regex expression in python for this text
Question: I have a complicated text file, here is part of it:

    
    
    & \multirow{2}{*}{52.7} & \multirow{2}{*}{3} & \multirow{2}{*}{$<$ 0.001}\\
    

I'm interested in the numbers after the `{*}`. Here is what I tried with no
luck:

    
    
    import re
    m = re.findall(r'{\*}{(.+)}', '& \multirow{2}{*}{52.7} & \multirow{2}{*}{3} & \multirow{2}{*} $<$ 0.001}\\')
    

However, I get the following result:

    
    
    ['52.7} & \\multirow{2}{*}{3} & \\multirow{2}{*}{$<$ 0.001']
    

I tried many other combinations but I either get the first number (e.g 52.7),
or the middle number (3) or the above. How can I get `52.7, 3, $<$ 0.001` in a
group (list).


Answer: That's because by default `+` and `*` operators are greedy. Use non-greedy
modification instead:

    
    
    {\*}{(.+?)}
    

Reference: <http://www.regular-expressions.info/repeat.html> ("_Watch Out for
The Greediness!_ " section)

