code: protected function isRegexPattern($string) {
          return str_starts_with($string, '/') &&
              str_ends_with($string, '/') ||
              str_starts_with($string, '#') &&
              str_ends_with($string, '#');
      }
docs: @param $string
  
  @return bool