golang regex example

package main

import (
    "fmt"
    "regexp"
)

func main() {
    // Define the input string
    input := "The quick brown fox jumps over the lazy dog"

    // Define the regular expression pattern
    pattern := `fox`

    // Compile the regular expression
    re := regexp.MustCompile(pattern)

    // Use the regular expression to find matches in the input string
    matches := re.FindString(input)

    // Print the matched string
    fmt.Println("Match:", matches)
}