if match_glob("foo.*", "foo.bar") echo "matched\n";
// prints foo.bar and foo.baz
$regex = glob_to_regex("foo.*");
for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t)
{
if (/$regex/) echo "matched: $car\n";
}
Glob implements glob(3) style matching that can be used to match
against text, rather than fetching names from a filesystem.
Based on the Perl Text::Glob module.
Summary
MethodsPropertiesConstantstoRegex() No public properties foundNo constants foundNo protected methods foundNo protected properties foundN/ANo private methods foundNo private properties foundN/A