protected function prepare_form_data($regexes) {

        $regexes = json_decode($regexes);

        $form = array();

        $i = 0;

        foreach ($regexes as $value => $regex) {
            $expressionname  = 'expression'.$i;
            $valuename = 'value'.$i;

            $form[$expressionname] = $regex;
            $form[$valuename] = $value;
            $i++;
        }

        return $form;
    }