How do you match the string ello w in hello world
Got to this error from trying this example
package main
import (
"fmt"
"regexp"
)
func check(result string ) string {
if (regexp.MatchString("b\\ello w\\b",result)) {
fmt.Println("Found it ")
return "True"
} else {
return "False"
}
}
func main() {
text := "Hello world "
check (text)
}
throws the following error
# command-line-arguments
.\test.go:14:5: multiple-value regexp.MatchString() in single-value context
false <nil>, Also you don't callcheckfunction from your main. Please share a reproducible exampleregexpand i used the example in that link to write the script that throws the error