Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have to use pre_match_all into a large string I've read the
limitations of pcre http://www.pcre.org/pcre.txt in the section
LIMITATION it is said to compile you can compile PCRE with an internal
linkage size of 3 or 4. Can someone explain me what does it means??
thanks in advance

Re: pcre

alberto schreef:
Quoted text here. Click to load it


 From your source:
There are some size limitations in PCRE but it is hoped that they  will
never in practice be relevant.
The  maximum  length of a compiled pattern is 65539 (sic) bytes if PCRE
is compiled with the default internal linkage size of 2. If you want to
process  regular  expressions  that are truly enormous, you can compile
PCRE with an internal linkage size of 3 or 4 (see the  README  file  in
the  source  distribution and the pcrebuild documentation for details).
In these cases the limit is substantially larger.  However,  the  speed
of execution is slower.

The way I read that: There is a limitation to the length of the applied
pattern, not the data (string) it is matched against.
So you have to worry about this limitation if your regular expression
itself becomes that huge.

Is your regular expression itself that huge?

Erwin Moller

"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare

Re: pcre

On 28 Dic, 15:37, Erwin Moller
Quoted text here. Click to load it

thanks Erwin for the anwser.
but the pattern is not huge indeed is small. but I can not understand
why still not working
there some other reason why pcre not working? Any other limitations?

Re: pcre

On Mon, 28 Dec 2009 07:26:50 -0800 (PST), alberto wrote:

Quoted text here. Click to load it

There are a veritable dumptruck-load of possible reasons why a pcre
might not be matching what you think it should. The key to knowing
precisely WHICH reason it might be depends on what error message you're
getting (if any), what your needle is, what your haystack is, and what
match pattern you're using. Supply those things, and we'll be able to
help a lot more.

  For every rational explanation there are an infinite number of
  irrational explanations.
              -- Staples' Observation

Site Timeline