Significant length of text and its contents.
As an example, a regular expression a+bwill not be able to quickly match a string containing a million b, but slower on a string containing one million as. This is because in the second case more backtracking will be required.
import timeit
x = "re.search('a+b', s)"
print timeit.timeit(x, "import re;s='a'*10000", number=10)
print timeit.timeit(x, "import re;s='b'*10000", number=10)
Results:
6.85791902323
0.00795443275612