code: protected function transformPatternToRegEx(string $pattern) : string
      {
          $pattern = str_replace('*', '.*', $pattern);
          $pattern = str_replace('?', '.', $pattern);
          return '/^' . $pattern . '$/';
      }
docs: Transforms a simplified pattern (* for multiple characters ? for one)
  to a regular expression.
  
  @param string $pattern
  @return string