On Thursday 10 February 2011 10:11:05 Denis Linvinus wrote:
> Hello!
Hi,
> > > As we have problem only with template condition, better decode
> > > only condition.
> >
> > Ok, what about this patch for you?
>
> This patch also works for me.
Great news!
> But i don't understand why
>
> if (preg_match_all("/##IF([a-z\.]*)[=]?(.*)##/Ui",$string,$out)) {
>
> not the same as
>
> if (preg_match_all("/##IF([a-z\.]*)[=]?(.*?)##/i",$string,$out)) {
Maybe we should double the question mark if the whole expression is considered
ungreedy :
if (preg_match_all("/##IF([a-z\.]*)[=]??(.*)##/Ui",$string,$out)) {
"The question mark ? changes the behavior of the quantifiers *, +, ? from
"greedy" to "ungreedy" in a "greedy" regular expression. But the same question
mark ? changes the behavior of the quantifiers *, +, ? from "ungreedy"
to "greedy" in an "ungreedy" regular expression!"
I didn't test it.
Nicolas
_______________________________________________
Glpi-dev mailing list
[email protected]
https://mail.gna.org/listinfo/glpi-dev