The Tideland Go Matcher provides a simple pattern matching. It matches the following pattterns:
?
matches one char*
matches a group of chars[abc]
matches any of the chars inside the brackets[a-z]
matches any of the chars of the range[^abc]
matches any but the chars inside the brackets\
escapes any of the pattern chars
if matcher.Matches("g*e g?", "Google Go", matcher.IgnoreCase) { ... }
if matcher.Matches("[oO][kK]", "ok", matcher.ValidateCase) { .... }
- Frank Mueller (https://github.com/themue / https://github.com/tideland / https://themue.dev)