基于字符串前缀优化子数组的创建

In my last question, was created a way to divide a array based in the string pattern Father_son, but now i need a way to split too a new pattern: Father_N_son

Original (generated by http://ideone.com/pmHHR code) :

array
  'Pagamento' => 
    array
      'data' => string '' (length=0)
      '0_pessoaId' => string '85' (length=2)
      '0_valorBruto' => string '890.00' (length=6)
      '1_pessoaId' => string '83' (length=2)
      '1_valorBruto' => string '20.00' (length=5)

Now i need:

array
  'Pagamento' => 
    array
      'data' => string '' (length=0)
      0 => 
        array
          'pessoaId' => string '85' (length=2)
          'valorBruto' => string '890.00' (length=6)
      1 => 
        array
          'pessoaId' => string '83' (length=2)
          'valorBruto' => string '20.00' (length=5)

Thanks, Celso

my solution with regex:

static function parserRequest($array = null) {

        if (empty($array)) {
            $array = $_REQUEST;
        }

        foreach ($array as $k => $v) {

            $name = explode('_', $k);
            $newkey = array_shift($name);
            $newname = implode('_', $name);

            //para o padrão Entidade.n.atributo
            if(preg_match("/[0-9]_[a-z]/", strtolower($newname))){

                $nameValued    = explode('_',$newname);
                $newkeyValued  = array_shift($name);
                $newnameValue  = implode('_', $name);

                $result[$newkey][$newkeyValued][$newnameValue] = $v;

            }else{

                //para o padrão Entidade.atributo
                $result[$newkey][$newname] = $v;

            }

        }

        return $result;
    }