Created
February 14, 2014 23:29
-
-
Save skimbrel/9011738 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.search 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