(non-PHPdoc)
@see dflydev\util\antPathMatcher.IAntPathMatcher::isPattern()
337281
public function isPattern($path)
    {
        return strstr($path, '*') !== false or strstr($path, '?') !== false or '/' == substr($path, '-1');
    }
411158
private function preparePattern(string ...$excludePatterns): ?string
    {
        if (count($excludePatterns) === 0) {
            return null;
        }

        return sprintf(
            '@^(%s)$@',
            implode(
                '|',
                array_map(
                    function (string $pattern): string {
                        return preg_quote(
                            str_replace('\\', '/', $pattern),
                            '@'
                        );
                    },
                    $excludePatterns
                )
            )
        );
    }
438338
function checkPattern(sections) {
	var length = sections.length;
	for (var index = 0; index < length; index++) {
		var current = sections[index];
		if (current[0] === WILDCARD_ALL) {
			if (!isLast(sections, index))
				throw new TypeError("# wildcard can only be at the end of a pattern. In: " + sections.join("/"));
		}
	}
}
375024
protected function assertPattern($pattern)
    {
        if (strlen($pattern) == 0) return null;

        $pattern = '/^'. str_replace('/', '\\/', $pattern). '$/';
        if (@preg_match($pattern, null) === false) {
            throw new DefinitionException("invalid regular expression pattern");
        }

        return $pattern;
    }
921914
public function isPattern(string $string): bool
    {
        return strpos($string, '*') !== false || strpos($string, '|') !== false;
    }
829123
public function anythingBut($value, $subPattern = null)
    {
        return $this->add('[^' . $this->sanitise($value) . ']*', $subPattern);
    }
48847
private Pattern createPattern(String smarts, IChemObjectBuilder builder) throws IOException {
        SmartsPattern ptrn = SmartsPattern.create(smarts, builder);
        ptrn.setPrepare(false); // avoid redoing aromaticity etc
        return ptrn;
    }
245288
private void checkPatternMatching(Map<String, PatternCacheControl> patterns, String specificPattern, String generalPattern) {
        if (PatternMatcherUtils.caseInsensitiveMatch(specificPattern, generalPattern)) {
            PatternCacheControl specificPatternDirective = patterns.get(specificPattern);
            PatternCacheControl generalPatternDirective = patterns.get(generalPattern);
            generalPatternDirective.incrementMatchingPatternCount();
            ConflictResolverUtils.resolveConflicts(specificPatternDirective, generalPatternDirective);
        }
    }
1087939
public static function is($pattern, $value)
    {
        if ($pattern === $value) {
            return true;
        }

        $pattern = preg_quote($pattern, '#');
        /**
         * Asterisks are translated into zero-or-more regular expression wildcards to make it convenient to check
         * if the strings starts with the given pattern such as "library/*", making any string check convenient.
         */
        $pattern = str_replace('\*', '.*', $pattern) . '\z';

        return (bool) preg_match('#^' . $pattern . '#', $value);
    }
418692
protected function _checkPcrePattern($pattern = null) {
		if (empty($pattern)) {
			return null;
		}

		$result = true;
		try {
			//@codingStandardsIgnoreStart
			$matchResult = @preg_match($pattern, 'some text');
			//@codingStandardsIgnoreEnd
			if ($matchResult === false) {
				$result = false;
			}
		} catch (Exception $exception) {
			$result = false;
		}

		return $result;
	}
958794
public boolean isPatterned() {

        final boolean result;
        if (pattern.indexOf('*') != -1 || pattern.indexOf('?') != -1) {
            result = true;
        } else {
            result = false;
        }

        return result;
    }
917711
public function findByPattern($rulePattern) {
        $logger = $GLOBALS['logger'];
        $path    = 'rules/';
        $request = $this->_remoteServer->get($path);
        $query = $request->getQuery();
        $query->set('pattern',$rulePattern);
        $logger->info(print_r($query,1));
        //$request = $this->_remoteServer->get($path, array(), array('pattern'=>urlencode($rulePattern))); 
        try {
            $response = $request->send();
            if ($response->getStatusCode() !== 200) {
                throw new \Exception('Unable to handle request');
            }
            $rawResponse = $response->getBody('true');
            return $rawResponse;
        } catch (\Exception $e) {
            throw $e; 
        }
        
    }
447516
public function pattern($pattern = null)
        {
            if ($pattern === null) return $this->rulePattern;

            $this->rulePattern = $pattern;

            return $this;
        }
494184
function addPattern($pattern, $label = true) {
            $count = count($this->_patterns);
            $this->_patterns[$count] = $pattern;
            $this->_labels[$count] = $label;
            $this->_regex = null;
        }
620025
public static function matchRoutePattern($routePattern, $path)
    {
        $expr = preg_replace('/\{([^}]+)\}/', '###', $routePattern);
        $expr = preg_quote($expr, '/');
        $expr = str_replace('###', '(.*)', $expr);
        $expr2 = preg_replace('/\(\.\*\)$/', '', $expr);
        $matched = preg_match('/^' . $expr . '\/?$/i', $path) || preg_match('/^' . $expr2 . '?$/i', $path);
        return $matched;
    }
395586
public function checkUriPattern($patterns)
    {
        if (!$this->request) {
            return false;
        }

        foreach ((array)$patterns as $p) {
            if (str_is($p, $this->uri)) {
                return true;
            }
        }

        return false;
    }
529455
private static function isFileNamePatternMatch($name, $pattern, $options) {
    if (in_array($name, static::$excluded_file_names)) {
      return false;
    }

    $fnmatch_flags = 0;
    if ($options & GLOB_NOESCAPE) {
      $fnmatch_flags |= FNM_NOESCAPE;
    }

    return fnmatch($pattern, $name, $fnmatch_flags);
  }