Skip to content

Instantly share code, notes, and snippets.

@jamiekt
Created July 22, 2022 13:12
Show Gist options
  • Save jamiekt/ca41cf4e3a191e3845f96b332ef6a216 to your computer and use it in GitHub Desktop.
Save jamiekt/ca41cf4e3a191e3845f96b332ef6a216 to your computer and use it in GitHub Desktop.
prefixes = set()
for matched_policy in matched_policies:
search_result = re.search(r_search, matched_policy)
assert search_result is not None
prefixes.add(search_result.group(0))
return prefixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment