Skip to content

Instantly share code, notes, and snippets.

Created February 14, 2014 23:29
What would you like to do?
In [1]: import re
In [2]: p = re.compile('foo.*bar')
In [3]: s = 'foo' + 'a' * 2**16 + 'bar'
In [4]: len(s)
Out[4]: 65542
In [5]: p.
p.findall p.finditer p.flags p.groupindex p.groups p.match p.pattern p.scanner p.split p.sub p.subn
In [5]: p.match(s)
Out[5]: <_sre.SRE_Match at 0x104c83648>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment