code: public static function regex($pattern, $message = null)
      {
          $check = function ($input) use ($pattern) {
              return preg_match($pattern, $input);
          };
  
          return new ResultsIn\OutcomeRule($check, $message);
      }
docs: @param string $pattern
  @param string $message
  
  @return OutcomeRule