glob-intersection
This is a Haskell port of the Go package located here: https://github.com/yashtewari/glob-intersection.
Usage
- Import
Data.GlobIntersection
- Use
parse
to obtain aPattern Char
(or an error) - Check if two patterns overlap using
intersects
Limitations
It shares the set of limitations with the Go package:
- It is assumed that all input is rooted at the beginning and the end, i.e, starts and ends with the regexp symbols
^
and$
respectively. This is done because any non-rooted expressions will always match a non-empty set of non-empty strings. - The only special symbols are:
.
for any character.+
for 1 or more of the preceding expression.*
for 0 or more of the preceding expression.[
and]
to define regexp-style character classes.-
to specify Unicode ranges inside character class definitions.\
escapes any special symbol, including itself.