package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(?<=[A-Za-z]\d:)\w+(?=\D+ )`)
var str = `08:27:08,946 INFO [com.cars.bdlx.manageinvoice.common.ManageInvoiceService-170] (http-/0.0.0.0:8080-22) REQUEST:V4:dUowlr45NG88:GET_INVOICE_PDF InvoicePdfRequest[customerID=12345678,accountNumber=987654321,invoiceNumber=33333333,countryCode=UK,page=<null>,pageFrom=<null>,pageTo=<null>,copy=false,billingSystemID=MOB,date=<null>,brand=TIGER,callingSystem=Base,userId=777777777,additionalRights=<null>]
08:27:08,244 INFO [TIME-460] (http-/0.0.0.0:8080-7) TIME:V4:YpXGo1j4dMcS:GET_INVOICE_PDF:0.048
`
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/