commit 8c4ea44ddab2f7b26f388460c32f29e4f68b45f0 parent 99a2d205f87bdda84fd4b0044ee543b7d483d67b Author: David Eisinger <[email protected]> Date: Tue, 11 Jul 2023 09:53:25 -0400 golang regular expressions Diffstat:
| M | content/notes/golang/index.md | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git 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)`