src/Peekmo/JsonPath/JsonPath.php
private function normalize($expression)
    {
        // Replaces filters by #0 #1...
        $expression = preg_replace_callback(
            array("/[\['](\??\(.*?\))[\]']/", "/\['(.*?)'\]/"),
            array(&$this, "tempFilters"),
            $expression
        );

        // ; separator between each elements
        $expression = preg_replace(
            array("/'?\.'?|\['?/", "/;;;|;;/", "/;$|'?\]|'$/"),
            array(";", ";..;", ""),
            $expression
        );

        // Restore filters
        $expression = preg_replace_callback("/#([0-9]+)/", array(&$this, "restoreFilters"), $expression);
        $this->result = array(); // result array was temporarily used as a buffer ..
        return $expression;
    }
private function normalize($expression)
    {
        // Replaces filters by #0 #1...
        $expression = preg_replace_callback(
            array("/[\['](\??\(.*?\))[\]']/", "/\['(.*?)'\]/"),
            array(&$this, "tempFilters"),
            $expression
        );

        // ; separator between each elements
        $expression = preg_replace(
            array("/'?\.'?|\['?/", "/;;;|;;/", "/;$|'?\]|'$/"),
            array(";", ";..;", ""),
            $expression
        );

        // Restore filters
        $expression = preg_replace_callback("/#([0-9]+)/", array(&$this, "restoreFilters"), $expression);
        $this->result = array(); // result array was temporarily used as a buffer ..
        return $expression;
    }
private function normalize ( $ expression ) { // Replaces filters by #0 #1...
 $ expression = preg_replace_callback ( array ( "/[\['](\??\(.*?\))[\]']/" , "/\['(.*?)'\]/" ) , array ( & $ this , "tempFilters" ) , $ expression ) ; // ; separator between each elements
 $ expression = preg_replace ( array ( "/'?\.'?|\['?/" , "/;;;|;;/" , "/;$|'?\]|'$/" ) , array ( ";" , ";..;" , "" ) , $ expression ) ; // Restore filters
 $ expression = preg_replace_callback ( "/#([0-9]+)/" , array ( & $ this , "restoreFilters" ) , $ expression ) ; $ this -> result = array ( ) ; // result array was temporarily used as a buffer ..
 return $ expression ; }
normalize path expression
normalize path expression