Return the regex used for matching valid float

@return string
195276
public function getRegex()
    {
        switch ($this->decimalPoint) {
            case self::DECIMAL_COMMA:
                $regex = '/^-?\d+(,\d+)?$/';
                break;

            case self::DECIMAL_POINT_OR_COMMA:
                $regex = '/^-?\d+((\.|,)\d+)?$/';
                break;

            case self::DECIMAL_POINT:
            default:
                $regex = '/^-?\d+(\.\d+)?$/';
                break;
        }

        return $regex;
    }
398738
final public function readFloatBE()
    {
        if ($this->isLittleEndian()) {
            return $this->fromFloat(strrev($this->read(4)));
        } else {
            return $this->fromFloat($this->read(4));
        }
    }
1049790
def parse_float(float_str):
    """"""
    factor = __get_factor(float_str)
    if factor != 1:
        float_str = float_str[:-1]

    try:
        return float(float_str.replace(',', '')) * factor
    except ValueError:
        return None
362121
public function getRegexp()
	{
		$hosts = [];
		foreach ($this->items as $host)
		{
			$hosts[] = $this->normalizeHostmask($host);
		}

		$regexp = RegexpBuilder::fromList(
			$hosts,
			[
				// Asterisks * are turned into a catch-all expression, while ^ and $ are preserved
				'specialChars' => [
					'*' => '.*',
					'^' => '^',
					'$' => '$'
				]
			]
		);

		return '/' . $regexp . '/DSis';
	}
862220
private function norm()
    {
        $this->str = preg_replace("#^\s*#u", '', $this->str);
        $this->str = preg_replace("#\s*$#u", '', $this->str);
        $this->str = preg_replace("#\s+#u", ' ', $this->str);
        $this->str = preg_replace('#,$#u', ' ', $this->str);

        return true;
    }
1110019
public function getZ() : ?float 
    {
        if ( ! $this->hasZ()) {
            $this->setZ($this->getDefaultZ());
        }
        return $this->z;
    }
1293838
private function getFormattedValue(): string
    {
        return (string) is_numeric($this->value) ?
            $this->value :
            sprintf('"%s"', $this->value);
    }
747270
public function getLinesOfCode() : float
    {
        return $this->classes
            ->map(function ($class) {
                return $class->getFileName();
            })
            ->pipe(function ($classes) {
                return app(Analyser::class)->countFiles($classes->all(), false)['lloc'];
            });
    }
376637
protected function getRegex()
    {

        if( !self::$regexDefault ) {
            self::$regexDefault = implode(
                '|',
                array_map(
                    function($value){
                        return "(?<=[a-z0-9]){$value}(?=[A-Z])";
                    },
                    array_flip( self::$operations )
                )
            );
            self::$regexDefault = "/".self::$regexDefault."/";
        }

        return self::$regexDefault;

    }
716413
public static function fromFloat($float)
    {
        $str = substr(str_pad(str_replace('.', '', $float), 16, '0'), 0, 16);
        $m = new self();
        $m->int = (int)$str;
        $m->sec = (int)substr($str, 0, 10);
        $m->usec = (int)substr($str, -6);
        return $m;
    }
997694
public function toCapital(): string
    {
        @list($intPart, $decimalPart) = explode('.', $this->money, 2);
        if (0.0 === floatval($this->money)) {
            return '零元';
        }
        $result = $this->getIntPart($intPart);
        $result .= $this->getDecimalPart($decimalPart);

        return $result;
    }
44719
public function getFormatPattern()
    {
        static $kyr = self::KYR_CHARS;

        switch (true) {
            // X000XX77_OR_X000XX777
            case \preg_match("~^[{$kyr}]{1}\d{3}[{$kyr}]{2}\d{2,3}$~iu", $this->value) === 1:
                return self::FORMAT_PATTERN_1;

            // X000XX
            case \preg_match("~^[{$kyr}]{1}\d{3}[{$kyr}]{2}$~iu", $this->value) === 1:
                return self::FORMAT_PATTERN_2;

            // XX00077
            case \preg_match("~^[{$kyr}]{2}\d{3}\d{2}$~iu", $this->value) === 1:
                return self::FORMAT_PATTERN_3;

            // 0000XX77
            case \preg_match("~^\d{4}[{$kyr}]{2}\d{2}$~iu", $this->value) === 1:
                return self::FORMAT_PATTERN_4;

            // XX000077
            case \preg_match("~^[{$kyr}]{2}\d{4}\d{2}$~iu", $this->value) === 1:
                return self::FORMAT_PATTERN_5;

            // X000077
            case \preg_match("~^[{$kyr}]{1}\d{4}\d{2}$~iu", $this->value) === 1:
                return self::FORMAT_PATTERN_6;

            // 000X77
            case \preg_match("~^\d{3}[{$kyr}]{1}\d{2}$~iu", $this->value) === 1:
                return self::FORMAT_PATTERN_7;

            // 0000X77
            case \preg_match("~^\d{4}[{$kyr}]{1}\d{2}$~iu", $this->value) === 1:
                return self::FORMAT_PATTERN_8;
        }
    }
412866
protected function getTemplateRegexPattern()
    {
        $template = str_replace('.', '\.', $this->template);
        $template = str_replace('*', '[a-zA-Z0-9]*', $template);

        return sprintf('/^%s$/', $template);
    }
72235
public function getRules()
    {
        $this->defaultParams['num_decimals']    = 2;
        $this->defaultParams['num_decimals']    = 2;
        $this->defaultParams['round_type']      = Formatter::ROUND_CLASSIC;
        $this->defaultParams['decimal_sep']     = '.';
        $this->defaultParams['thousands_sep']   = ' ';
        $this->defaultParams['format_positive'] = '%v %s';
        $this->defaultParams['format_negative'] = '-%v %s';

        return array(
            'eur' => array(
                'symbol' => '€',
                'rate'   => 1,
            ),

            'usd' => array(
                'symbol'          => '$',
                'format_positive' => '%s%v',
                'format_negative' => '-%s%v',
                'rate'            => 0.5,
            ),

            'rub' => array(
                'symbol'      => 'руб.',
                'decimal_sep' => ',',
                'rate'        => 0.02,
            ),

            'uah' => array(
                'symbol'      => 'грн.',
                'decimal_sep' => ',',
                'rate'        => 0.04,
            ),

            'byr' => array(
                'symbol'       => 'Br',
                'round_type'   => Formatter::ROUND_CEIL,
                'round_value'  => '-2',
                'num_decimals' => '0',
                'rate'         => 0.00005,
            ),

            '%'   => array(
                'symbol'          => '%',
                'format_positive' => '%v%s',
                'format_negative' => '-%v%s',
            ),
        );
    }
491045
public function getValue() {
        $value = parent::getValue();
        if ($value) {
            $value = unformat_float($value, true);
        }
        return $value;
    }
461588
def format_float_field(__, prec, number, locale):
    """"""
    format_ = u'0.'
    if prec is None:
        format_ += u'#' * NUMBER_DECIMAL_DIGITS
    else:
        format_ += u'0' * int(prec)
    pattern = parse_pattern(format_)
    return pattern.apply(number, locale)
173160
public function castDecimal()
    {
        $min   = (float) 4.9E-324;
        $max   = (float) 1.7976931348623157E+308;
        $value = (float) $this->value;

        if ($value >= $min && $value <= $max) {
            return $value;
        }

        $castFunction = function($value) use ($min,$max) {
            if ($value < $min ) {
                return $min;
            }

            if ($value > $max) {
                return $max;
            }

            return (float) $value;
        };

        if (is_numeric($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'decimal');
    }