import res = '{{ SITE_AGGREGATE_SUBNET }}.3 remote-as {{ BGP-AS }}'print([x.strip() for x in re.findall(r'{{(.*?)}}', s) if '-' in x])
Standard input is empty
['BGP-AS']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!