https://github.com/antonsjava/web-path-matcher
/foo/** like path matcher
https://github.com/antonsjava/web-path-matcher
Last synced: about 2 months ago
JSON representation
/foo/** like path matcher
- Host: GitHub
- URL: https://github.com/antonsjava/web-path-matcher
- Owner: antonsjava
- License: apache-2.0
- Created: 2019-04-30T19:29:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T17:52:18.000Z (over 1 year ago)
- Last Synced: 2025-02-01T21:17:26.735Z (4 months ago)
- Language: Java
- Size: 158 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# web-path-matcher
Simple web path matching utility. Pattern to be matched can use
- individual '?' character to represent any character
- individual '*' character to represent any sequence of characters except '/'
- path segment with only '*' characters (more than one) to represent any sequence of path elements
Examples- '/foo/**' represents paths like /foo or /foo/bar/one
- '/foo/*.xml' represents paths like /foo/a.xml or /foo/bar.xml
- '/foo/?.xml' represents paths like /foo/a.xml or /foo/b.xmlIt is helper implementation for implementing http servlet filters and similar implementations.
## Java usage
```java
PathMatcher matcher = PathMatcher.instance("/foo/**");
String path = "/foo/bar";
if(matcher.match(path)) { ... }
```## Maven usage
```
io.github.antonsjava
web-path-matcher
LASTEVERSION
```