An open API service indexing awesome lists of open source software.

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

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.xml

It 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

```