Skip to content

Instantly share code, notes, and snippets.

@soap-DEIM
Last active December 30, 2015 03:09
Show Gist options
  • Save soap-DEIM/7767359 to your computer and use it in GitHub Desktop.
Save soap-DEIM/7767359 to your computer and use it in GitHub Desktop.
import re
re.findall(r"(?<=[\[])[^\[^\]]*(?=[\]])", "xxx[0xdeadbeef]yyy[aa]a")
# ['0xdeadbeef', 'aa']
re.findall(r"(?<=[\[])[^\[^\]]*(?=[\]])", "xxx[0xdeadbeef][aa]a")
# ['0xdeadbeef', 'aa']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment