Ejemplo n.º 1
0
 def __init__(self, placeholder):
     self.__regexes = [
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.DoubleDecimalPointRegex(placeholder)),
               val='DoubleNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.DoubleWithoutIntegralRegex(placeholder)),
               val='DoubleNum'),
         ReVal(re=PortugueseNumeric.DoubleWithMultiplierRegex,
               val='DoubleNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.DoubleWithRoundNumber),
               val='DoubleNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.DoubleAllFloatRegex),
               val='DoublePor'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.DoubleExponentialNotationRegex),
               val='DoublePow'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.DoubleCaretExponentialNotationRegex),
               val='DoublePow'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             self._generate_format_regex(LongFormatMode.DOUBLE_DOT_COMMA,
                                         placeholder)),
               val='DoubleNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             self._generate_format_regex(
                 LongFormatMode.DOUBLE_NO_BREAK_SPACE_COMMA, placeholder)),
               val='DoubleNum')
     ]
Ejemplo n.º 2
0
 def __init__(self,
              placeholder: str = PortugueseNumeric.PlaceHolderDefault):
     self.__regexes = [
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.NumbersWithPlaceHolder(placeholder)),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.NumbersWithSuffix, regex.S),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             self._generate_format_regex(LongFormatMode.INTEGER_DOT,
                                         placeholder)),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             self._generate_format_regex(LongFormatMode.INTEGER_BLANK,
                                         placeholder)),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             self._generate_format_regex(
                 LongFormatMode.INTEGER_NO_BREAK_SPACE, placeholder)),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.RoundNumberIntegerRegexWithLocks),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.NumbersWithDozenSuffix),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.AllIntRegexWithLocks),
               val='IntegerPor'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             PortugueseNumeric.AllIntRegexWithDozenSuffixLocks),
               val='IntegerPor')
     ]