![]() |
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... |
Actually I found a trivial solution for this problem that relates very specifically to the order in which I was process tags to minimize data expansion within the documents and prevent this from occuring; however a more 'acceptable' solution would still be good to hear, if anyone has any :D
|
| All times are GMT -5. The time now is 12:01 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC