diff --git a/regex/example_test.go b/regex/example_test.go index 2360a03..913518c 100644 --- a/regex/example_test.go +++ b/regex/example_test.go @@ -32,12 +32,12 @@ func ExampleReg_FindAll() { } func ExampleReg_FindString() { - regexStr := `\d+` + regexStr := `\w+\s+(?=sheep)` regexComp := regex.MustCompile(regexStr) - matchStr := regexComp.FindString("The year is 2025") + matchStr := regexComp.FindString("pink cows and yellow sheep") fmt.Println(matchStr) - // Output: 2025 + // Output: yellow } func ExampleReg_FindSubmatch() {