Regular expression in Go.
-
It's a best practice to use backtick for regexp pattern. String enclosed by backticks are more "literal," which makes it easier to write as certain characters like backlash isn't interpreted as an escape.
patternInDQuote := "[a-zA-Z0-9\\]+" // Double quote patternInBacktick := `[a-zA-Z0-9\]+` // Backtick
-
Run the program.
$ make run