WildcardMatch
Table of Contents
Constants
-
REPLACEMENT_SET
= ["\x1c", '[*]', '.*', '[?]', '.', '~']
-
SEARCH_SET
= [
'~~',
// convert double tilde to unprintable value
'~\*',
// convert tilde backslash asterisk to [*] (matches literal asterisk in regexp)
'\*',
// convert backslash asterisk to .* (matches string of any length in regexp)
'~\?',
// convert tilde backslash question to [?] (matches literal question mark in regexp)
'\?',
// convert backslash question to . (matches one character in regexp)
"\x1c",
]
Methods
-
compare()
: bool
-
wildcard()
: string
REPLACEMENT_SET
private
mixed
REPLACEMENT_SET
= ["\x1c", '[*]', '.*', '[?]', '.', '~']
SEARCH_SET
private
mixed
SEARCH_SET
= [
'~~',
// convert double tilde to unprintable value
'~\*',
// convert tilde backslash asterisk to [*] (matches literal asterisk in regexp)
'\*',
// convert backslash asterisk to .* (matches string of any length in regexp)
'~\?',
// convert tilde backslash question to [?] (matches literal question mark in regexp)
'\?',
// convert backslash question to . (matches one character in regexp)
"\x1c",
]
compare()
public
static compare(string|null $value, string $wildcard) : bool
Parameters
-
$value
: string|null
-
-
$wildcard
: string
-
wildcard()
public
static wildcard(string $wildcard) : string
Parameters
-
$wildcard
: string
-