https://github.com/dflydev/dflydev-util-antpathmatcher
Ant Path Matcher Utility
https://github.com/dflydev/dflydev-util-antpathmatcher
Last synced: about 1 year ago
JSON representation
Ant Path Matcher Utility
- Host: GitHub
- URL: https://github.com/dflydev/dflydev-util-antpathmatcher
- Owner: dflydev
- License: mit
- Created: 2011-12-28T06:44:33.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T23:04:11.000Z (over 3 years ago)
- Last Synced: 2025-04-14T02:28:35.637Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ant Path Matcher Utility
========================
An [Ant](http://ant.apache.org/) path pattern matcher for PHP. Implementation kindly borrowed from [Spring](http://www.springsource.org).
Requirements
------------
* PHP 5.3+
Usage
-----
```php
match('foo/**/baz/*.txt', 'foo/bar/baz/hello-world.txt')) {
echo "This is true!\n";
}
```
License
-------
This library is licensed under the New BSD License - see the LICENSE file for details.
Community
---------
If you have questions or want to help out, join us in the
[#dflydev](irc://irc.freenode.net/#dflydev) channel on irc.freenode.net.
Not Invented Here
-----------------
There are other PHP ports of Ant-like pattern matching but most were
either found to be incomplete, tied to actually walking a disk, or so
heavily embedded into another larger project it was not feasible to
use.
This implementation is purely string based and is based on the
AntPathMatcher found in Spring.