On Aug 24, 10:24 am, Russ Cox <
r...@swtch.com> wrote:
> On Tue, Aug 24, 2010 at 12:11 PM, justinb <
tactileju...@gmail.com> wrote:
> > I have a very large regex that I'd like to use to test re2.
> > Unfortunately, I seem to have run up against a memory constraint:
>
> > -bash-3.00$ ./rec++
> > re2/dfa.cc:432: DFA out of memory: prog size 147268 mem 220695
>
> > How can I go about increasing the available memory for the DFA?
>
> Initialize an RE2::Options structure using set_max_mem
> and then pass it to the RE2 constructor.
Okay, cool, but now I get this:
Couldn't compile regular expression, skipping: due to error pattern
too large - compile failed. My (unoptimized) regex is 147264
characters. Can RE2 handle that?