Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.45 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.45 KB

Tideland Go Matcher

GitHub release GitHub license Go Module GoDoc Workflow Go Report Card

Description

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

Examples

if matcher.Matches("g*e g?", "Google Go", matcher.IgnoreCase) { ... }

if matcher.Matches("[oO][kK]", "ok", matcher.ValidateCase) { .... }

Contributors