I'm not good with terms used in regex, so picking a suitable title for this question is some how difficult for me, so feel free the suggest a good title.
but anyway I have this txt and regex expression
import re
txt = """
%power {s}
shop %power {w}
%electricity {t}
""".replace('\n',' ')
x = re.findall("((\%?\w+\s)*)\{([^\}]*)\}",txt)
the result is
[('%power ', '%power ', 's'), ('shop %power ', '%power ', 'w'), ('%electricity ', '%electricity ', 't')]
but I was intended to get
[('%power ', 's'), ('shop ', '%power ', 'w'), ('%electricity ', 't')] so how can I achieve the desired?