From 8c4ea44ddab2f7b26f388460c32f29e4f68b45f0 Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Tue, 11 Jul 2023 09:53:25 -0400 Subject: [PATCH] golang regular expressions --- content/notes/golang/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/notes/golang/index.md b/content/notes/golang/index.md index e5daa6d..9d29173 100644 --- a/content/notes/golang/index.md +++ b/content/notes/golang/index.md @@ -82,3 +82,10 @@ I find [Go][1] really compelling, even though it's not super applicable to my jo [13]: https://crawshaw.io/blog/one-process-programming-notes [14]: https://medium.com/golang-learn/go-project-layout-e5213cdcfaa2 [15]: https://stephenn.com/2023/06/gopher-wrangling.-effective-error-handling-in-go/ + +### Notes + +* Regular Expressions + * Compile with `regexp.MustCompile` (no need to check for error) + * Strings denoted by backticks don't escape; use these for regular expressions + * For case-insensitive matching, start the expression with `(?i)`