package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(.{197})(?!(?:\r|\n))`)
var str = `IO.Unit._1.BottomBoard.Iin._1.AmpsA ,Current A Pump 1 ,29,57.80 ,0001641474794.344049,0000356036
PumpControl.Pump._1.PumpReverse.Reversing ,Pump 1 Reversing ,28,2875 ,0001641474794.026816,0000356035Faults.Pump._1.ThermalOverload.Status.Active ,Pump 1 Tripped ,24,1 ,0001641474793.000000,0000356034Faults.Pump._1.NotInAuto.Status.Active ,Pump 1 Unavailable ,24,1 ,0001641474793.000000,0000356033Faults.Pump._1.Flow.LowFlowFault.Status.Active ,Pump 1 Low Flow ,24,2 ,0001641474792.000000,0000356032Faults.Pump._1.Flow.LowFlowFault.Status.Active ,Pump 1 Low Flow ,24,4 ,0001641474792.000000,0000356031Faults.Pump._1.Flow.LowFlowFault.Status.Active ,Pump 1 Low Flow ,24,3 ,0001641474734.000000,0000355950IO.Unit._1.BottomBoard.Iin._1.AmpsB ,Current B Pump 1 ,29,0.00 ,0001641474724.555403,0000355949
`
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/