Пример #1
0
 def __init__(self, placeholder):
     self.__regexes = [
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.DoubleDecimalPointRegex(placeholder)),
               val='DoubleNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.DoubleWithoutIntegralRegex(placeholder)),
               val='DoubleNum'),
         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'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.DoubleWithMultiplierRegex),
               val='DoubleNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.DoubleWithRoundNumber),
               val='DoubleNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.DoubleAllFloatRegex),
               val=f'Double{FrenchNumeric.LangMarker}'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.DoubleExponentialNotationRegex),
               val='DoublePow'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.DoubleCaretExponentialNotationRegex),
               val='DoublePow')
     ]
Пример #2
0
 def __init__(self, placeholder: str = FrenchNumeric.PlaceHolderDefault):
     self.__regexes = [
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.NumbersWithPlaceHolder(placeholder), regex.I),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.NumbersWithSuffix, regex.S),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             self._generate_format_regex(LongFormatMode.INTEGER_DOT,
                                         placeholder), regex.V1),
               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(
             FrenchNumeric.RoundNumberIntegerRegexWithLocks),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.NumbersWithDozenSuffix),
               val='IntegerNum'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.AllIntRegexWithLocks),
               val=f'Integer{FrenchNumeric.LangMarker}'),
         ReVal(re=RegExpUtility.get_safe_reg_exp(
             FrenchNumeric.AllIntRegexWithDozenSuffixLocks),
               val=f'Integer{FrenchNumeric.LangMarker}')
     ]