code: function parseNumber(fmt, value) {
      var format = replace(fmt, /^\?/);
      if (format!=fmt && !trim(value))
        return _null;
      var decSep = (/(^|[^0#.,])(,|[0#.]*,[0#]+|[0#]+\.[0#]+\.[0#.,]*)($|[^0#.,])/.test(format)) ? ',' : '.';
      var r = parseFloat(replace(replace(replace(value, decSep == ',' ? /\./g : /,/g), decSep, '.'), /^[^\d-]*(-?\d)/, '$1'));
      return isNaN(r) ? undef : r;
    }
docs: format ?##00,00## returns number; null if optional and not set; undefined if parsing failed