|
As it ends up, it would appear that preg_replace actually has a limit to the size of the regular expression... this as you may know causes a bit of a problem, since I am writing a preparser for HTML pages which reads a very simple 'tag set' from an HTML file and replaces it with appropriate data (effectively producing a templating system which is REALLY easy for designers to understand and work with--without the need of a programming crash course).
The only problem is that I have one template that requires a really large section of code between an opening and closing 'if' tag to be replaces with a somewhat large table of data... and every time I run it, I get the following error:
Warning: Compilation failed: regular expression too large at offset 0 in ..... (ommited for security)
I can not find any information on google or php.net about there being a limit to the pattern size. Rewriting the code to work directecly with C/C++ style character streams is being avoided here, since PHP was not really intended for that purpose.
I am opening this thread for suggestion on how to get around this problem, any help would be appreciated. Thanks...
|