public function regexps(array $regexpsMap)
    {
        return function(FieldExpression $expr, $compiler) use ($regexpsMap)
        {
            $value = $expr->getValue();

            foreach ($regexpsMap as $regexp => $transformation) {
                if (preg_match($regexp, $value))
                    return $transformation($expr, $compiler);
            }

            throw new UnregisteredTransformationException("There is no transformation matching the value \"$value\"");
        };
    }
public function regexps(array $regexpsMap)
    {
        return function(FieldExpression $expr, $compiler) use ($regexpsMap)
        {
            $value = $expr->getValue();

            foreach ($regexpsMap as $regexp => $transformation) {
                if (preg_match($regexp, $value))
                    return $transformation($expr, $compiler);
            }

            throw new UnregisteredTransformationException("There is no transformation matching the value \"$value\"");
        };
    }
public function regexps ( array $ regexpsMap ) { return function ( FieldExpression $ expr , $ compiler ) use ( $ regexpsMap ) { $ value = $ expr -> getValue ( ) ; foreach ( $ regexpsMap as $ regexp => $ transformation ) { if ( preg_match ( $ regexp , $ value ) ) return $ transformation ( $ expr , $ compiler ) ; } throw new UnregisteredTransformationException ( "There is no transformation matching the value \"$value\"" ) ; } ; }
This map select the transformation with regexps on the exoression value

@param callable[] $regexpsMap
@return callable
This map select the transformation with regexps on the exoression value