package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?i)(?=_{20,}|From:|On\s\w{3},\s\w{3}\s\d{1,2},\s\d{4}\sat\s\d{1,2}:\d{2})`)
var str = `Great thank you
________________________________
From: Blake <blake@foursocial.uk>
Sent: Saturday, August 31, 2024 9:46:12 AM
To: blake hoang <bjh2004@hotmail.co.uk>
Subject: Re: Ignition. Campaign
Thanks , yes we can do it
---
Blake Junior
Managing Director | Foursocial.
blake@foursocial.uk<mailto:blake@foursocial.uk>
Submission Links<https://linktr.ee/foursocial1>
[https://ci3.googleusercontent.com/mail-sig/AIorK4yeSFbHM5imdVzOjDTr7LwNvS9gqpyQ83uajylr7mDBuRn5ymG1jlev6Zz8vvgQMzDLAYjFLcR7LVLu]
On Sat, Aug 31, 2024 at 9:45 AM blake hoang <bjh2004@hotmail.co.uk<mailto:bjh2004@hotmail.co.uk>> wrote:
Hey there let me know the fee`
if len(re.FindStringIndex(str)) > 0 {
fmt.Println(re.FindString(str),"found at index",re.FindStringIndex(str)[0])
}
}
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/