package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(?<=\))(.+?)(\d\/\d{4}.*)`)
var str = `Cloud Innovators Solution (9 months)Social Media Marketing Specialist1/2020 - 10/2020
StoriCamPK (less than a month)Marketing Communications Manager7/2022
Coleman Estate Agents (13 years, 11 months)Director8/2009
Coleman Estate Agents NewYork (13 years, 11 months)Director8/2009
TCS (less than a month)Head of Search Engine Optimization ➤ Brand & Strategy || Go-to-market Strategy || Content Marketer8/2010
Collins Securities Pty Ltd (less than a month) Credit ManagerInvalid date
`
for i, match := range re.FindAllString(str, -1) {
fmt.Println(match, "found at index", i)
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Golang, please visit: https://golang.org/pkg/regexp/