code: function filter_number(value) {
      var m = NUMBER_RE.exec(value);
      if(m == null) throw OptError('Expected a number representative');
      if(m[1]) {
          // The number is in HEX format. Convert into a number, then return it
          return parseInt(m[1], 16);
      } else {
          // The number is in regular- or decimal form. Just run in through
          // the float caster.
          return parseFloat(m[2] || m[3]);
      }
  }
docs: Switch argument filter that expects an integer, HEX or a decimal value. An exception is throwed if the criteria is not matched. Valid input formats are: 0xFFFFFFF, 12345 and 1234.1234