use strict;
my $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
';
my $regex = qr/(.{197})(?!(?:\r|\n))/mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
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 Perl, please visit: http://perldoc.perl.org/perlre.html