package main
import (
"fmt"
"regexp"
)
func main() {
s1 :=
"Welcome to GeeksforGeeks"
s2 :=
"I like Go language!!!"
p1 :=
"to"
p2 :=
"ang"
p3 :=
"OO"
p4 :=
"!"
res1, e := regexp.MatchString(p1, s1)
fmt.Println(
"Result and Error is:"
, res1, e)
res2, e := regexp.MatchString(p2, s1)
fmt.Println(
"Result and Error is:"
, res2, e)
res3, e := regexp.MatchString(p3, s1)
fmt.Println(
"Result and Error is:"
, res3, e)
res4, e := regexp.MatchString(p4, s1)
fmt.Println(
"Result and Error is:"
, res4, e)
res5, e := regexp.MatchString(p1, s2)
fmt.Println(
"Result and Error is:"
, res5, e)
res6, e := regexp.MatchString(p2, s2)
fmt.Println(
"Result and Error is:"
, res6, e)
res7, e := regexp.MatchString(p3, s2)
fmt.Println(
"Result and Error is:"
, res7, e)
res8, e := regexp.MatchString(p4, s2)
fmt.Println(
"Result and Error is:"
, res8, e)
}