My patte:
/{LOOP:(w+)[^}]*}((s*?.?)*?){/LOOP:1}/
My Test String:
<tbody>
{LOOP:MENU}
<tr>
<td>{VAR:ID}</td>
<td>{VAR:NAME}</td>
<td>{VAR:ROLLE}</td>
<td>{VAR:ACTIONS}</td>
</tr>
{/LOOP:MENU}
</tbody>
When you try it on regex101 it is working without any problems. But when I try it on my Server with preg_match_all, it is not working. preg_last_error() retus 2(PREG_BACKTRACK_LIMIT_ERROR).
How is that possible with regex101 telling me "1 Match in 581 Steps"? Or has the number of Steps nothing to do with Backtrack?
I'm using apache2 Server with PHP Version 5.5.9-1ubuntu4.16.
in my php.ini, pcre.backtrack_limit is set on 1000000.
I hope you can help me, im really desperate.
php-code:
preg_match_all("/{LOOP:(w+)[^}]*}((s*?.?)*?){/LOOP:1}/", $template, $matches, PREG_SET_ORDER);
