Created
August 1, 2014 03:22
-
-
Save ProTip/f7845e9b2cf36b6e8731 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var field = "This is an error message about windows" | |
func main(){ | |
fmt.Println("Hello World") | |
matcher := regexp.MustCompile(`(windows)|(bob)|(error)`) | |
matches := matcher.FindAllStringSubmatch(field,-1) | |
fmt.Println(matches) | |
####################################### | |
[[error _ _ error] [windows windows _ _]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment