public static function replaceArrayKeys($dataArray, $oldKeyPattern, $newKey)
    {
        $effect = [];

        if (is_array($dataArray) && !empty($dataArray)) {
            foreach ($dataArray as $key => $value) {
                if (preg_match($oldKeyPattern, $key)) {
                    $key = $newKey;
                }

                if (is_array($value)) {
                    $value = self::replaceArrayKeys($value, $oldKeyPattern, $newKey);
                }

                $effect[$key] = $value;
            }
        }

        return $effect;
    }