https://github.com/jadogg/simplematch
Simple Pattern Matcher for Java
https://github.com/jadogg/simplematch
Last synced: 9 months ago
JSON representation
Simple Pattern Matcher for Java
- Host: GitHub
- URL: https://github.com/jadogg/simplematch
- Owner: JaDogg
- License: mit
- Created: 2014-07-25T19:12:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-08-21T19:07:04.000Z (over 11 years ago)
- Last Synced: 2025-02-10T02:13:36.903Z (11 months ago)
- Language: Java
- Homepage:
- Size: 695 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SimpleMatch
===========
Simple Pattern Matcher for Java
[](https://travis-ci.org/JaDogg/SimpleMatch)
What does it do?
---
1. Matches a `?` for any single character
1. Matches an `*` for one or more characters
How to use ?
---
1. `SimpleMatch.match("a*","abcd");` or
2. `SimpleMatch m = new SimpleMatch("a*", "abcdefg");` and call `m.match();`
More info
---
3. It will either return `true` or `false` or throw an `IllegalArgumentException`
4. `IllegalArgumentException` occurs if any parameter is `null` or `length==0`
5. Always false on `pattern length > string length`