fork download
  1. import re
  2. s = '{{ SITE_AGGREGATE_SUBNET }}.3 remote-as {{ BGP-AS }}'
  3. print(re.findall(r'{{\s*((?:(?!{{|}})[^-])*-.*?)\s*}}', s))
Success #stdin #stdout 0.04s 9656KB
stdin
Standard input is empty
stdout
['BGP-AS']