Go Lang Notes


Regular Expressions

Regular Expressions

Go By Example on Regular Expressions

Tests if a pattern matches a string

match, _ := regexp.MatchString("p([a-z]+)ch", "peach")

Compile a regular expression for use in others

r, _ := regexp.Compile("p([a-z]+)ch")

online Go regex tester