Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Re: Large regular expressions
MRAB
3/15/2010 3:51:00 PM
Nathan Harmston wrote:
> Hi,
>
> So I m trying to use a very large regular expression, basically I have
> a list of items I want to find in text, its kind of a conjunction of
> two regular expressions and a big list......not pretty. However
> everytime I try to run my code I get this exception:
>
> OverflowError: regular expression code size limit exceeded
>
> I understand that there is a Python imposed limit on the size of the
> regular expression. And although its not nice I have a machine with
> 12Gb of RAM just waiting to be used, is there anyway I can alter
> Python to allow big regular expressions?
>
> Could anyone suggest other methods of these kind of string matching in
> Python? I m trying to see if my swigged alphabet trie is faster than
> whats possible in Python!
>
There's the regex module at
http://pypi.python.org/...
. It'll
even release the GIL while matching on strings! :-)
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Large regular expressions
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password