![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
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...
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#2 |
|
Expert Programmer
|
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
![]()
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|