From badfcd81714ff7ce6caa40c68f16b8d36662a44e Mon Sep 17 00:00:00 2001 From: gobwas Date: Thu, 25 Feb 2016 00:42:32 +0300 Subject: [PATCH] update with QuoteMeta --- readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index dcb4b2a..43f827b 100644 --- a/readme.md +++ b/readme.md @@ -25,6 +25,10 @@ func main() { g = glob.MustCompile("*.github.com") g.Match("api.github.com") // true + // quote meta characters and then create simple glob + g = glob.MustCompile(glob.QuoteMeta("*.github.com")) + g.Match("*.github.com") // true + // create new glob with set of delimiters as ["."] g = glob.MustCompile("api.*.com", '.') g.Match("api.github.com") // true @@ -76,7 +80,6 @@ func main() { g.Match("fat") // true g.Match("at") // false - // create glob with pattern-alternatives list g = glob.MustCompile("{cat,bat,[fr]at}") g.Match("cat") // true