Dear SMW'ers

A recent post asked about passing values to a template in order to perform an {{#expr: .... }}.  I thought I'd share my solution to this which is a small  patch to the file /extension/ParserFunctions/Expr.php.   Essentially it strips out all the [ , : , | and ] from the input.

I am brand new to both SMW and PHP so any comments / suggestions / scoldings are  welcome!

Joe
P.s. SMW is fantastic! Thank you.

# diff Expr_SVN.php Expr_JOE.php
118a119,134
>                       //Joe's edit to handle values passed from SMW searches:
>                       if ($char == '[') {
>                               do {
>                                       ++$p;
>                                       $char=$expr[$p];
>                               } while ($char != "|");
>                               ++$p;
>                               $char=$expr[$p];
>                       }
>                       while ($char == ']' && $p < $end) {
>                               if ($p+1 != $end) {}
>                               ++$p;
>                               $char=$expr[$p];
>                       }
>                       if ($p == $end) break;
>