OverflowError: regular expression code size limit exceeded

G

gdetre

Dear all,

I'm trying to get a large, machine-generated regular expression (many
thousands of characters) to work in Python on a Mac (running Leopard),
and I keep banging my head against this brick wall:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/greg/elisp/freex/freex_sqlalchemy.py", line 715, in
update_implicit_link_regexp_temp
impLinkRegexp = re.compile(aliasRegexpStr,re.IGNORECASE|
re.MULTILINE)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/re.py", line 180, in compile
return _compile(pattern, flags)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/re.py", line 231, in _compile
p = sre_compile.compile(pattern, flags)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/sre_compile.py", line 530, in compile
groupindex, indexgroup
OverflowError: regular expression code size limit exceeded

I have successfully run this regular expression many times under
linux. I tried it first with the default python iinstallation on
Leopard, 2.5.1, but I've also tried it with tthe latest .dmg i could
find on the python.org site:

Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin

I'm really lost about how to proceed. Any ideas?

Thank you,
Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top