Add LIKE, which uses glob matching instead of regex.
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 712
- Avg merge
- 15h 41m
- Merged PRs (30d)
- 53
Description
### Version
4.6.1
### Feature
`LIKE` provides glob matching of strings.
It is simpler; regular expressions with escaping and meta characters can be offputting.
`LIKE("ABCDE...XYZ", "AB*Z")` is true.
There are two cases of glob string matching.
Most SQL system have `LIKE` and use `_` and `%` - and these provide character ranges `[abcde]` or `[a-z]`, negated ranges `[^... ]` but there is also filename matching, and programming libraries, using `*` and `?` and sometimes support of character ranges.
Glob matching is anchored.
A flag, c.f. `REGEX` would be allowed; there is only one valid flag,"i" (case insensitive).
The old Apache ORO codebase has a "glob to regex" converted.
There are java code libraries for just `*` and `?` (e.g. Apache Commons-IO `FilenameUtils.wildcardMatch`).
### Are you interested in contributing a solution yourself?
Yes
Contributor guide
Research direction
No repository file or test entry point is named in the issue. Begin by locating the existing REGEX function and its registration, then resolve whether LIKE uses SQL-style or filename-style glob syntax and how the `i` flag behaves. Done means the selected glob semantics are implemented, documented by tests, and compatible with anchored matching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100