use strict;
my $str = '2020-06-05 01:00:33.919 INFO [Thread-261246][HClient.java:256] - post successefully
2020-06-05 01:00:33.920 INFO [Thread-261246][HClient.java:257] - {"ResponseStatusListObject":{"ResponseStatusObject":[{"RequestURL":"/VIID/Faces","StatusCode":"0","StatusMessage":"正常","Id":"31010713011328005232","LocalTime":"20200605005843"}]}}
2020-06-05 01:00:33.920 INFO [Thread-261246][PutuoHandle.java:104] - list send end, listSize:6, sendTime:757ms
2020-06-05 01:00:34.160 INFO [Thread-261248][HClient.java:256] - post successefully
2020-06-05 01:00:34.160 INFO [Thread-261248][HClient.java:257] - {"ResponseStatusListObject":{"ResponseStatusObject":[{"RequestURL":"/VIID/Faces","StatusCode":"0","StatusMessage":"正常","Id":"31010712011328005082","LocalTime":"20200605010212"}]}}
2020-06-05 01:00:34.196 INFO [Thread-261247][HClient.java:256] - post successefully
2020-06-05 01:00:34.196 INFO [Thread-261247][HClient.java:257] - {"ResponseStatusListObject":{"ResponseStatusObject":[{"RequestURL":"/VIID/Faces","StatusCode":"0","StatusMessage":"正常","Id":"31010712011328005082","LocalTime":"20200605010240"}]}}
2020-06-05 01:00:34.196 INFO [Thread-261247][PutuoHandle.java:104] - list send end, listSize:5, sendTime:954ms
2020-06-05 01:00:34.323 INFO [Thread-261248][HClient.java:256] - post successefully
2020-06-05 01:00:34.323 INFO [Thread-261248][HClient.java:257] - {"ResponseStatusListObject":{"ResponseStatusObject":[{"RequestURL":"/VIID/Faces","StatusCode":"0","StatusMessage":"正常","Id":"31010713011328005232","LocalTime":"20200605005843"}]}}
2020-06-05 01:00:34.510 INFO [Thread-261248][HClient.java:256] - post successefully
2020-06-05 01:00:34.510 INFO [Thread-261248][HClient.java:257] - {"ResponseStatusListObject":{"ResponseStatusObject":[{"RequestURL":"/VIID/Faces","StatusCode":"0","StatusMessage":"正常","Id":"31010711011328005078","LocalTime":"20200605010240"}]}}
2020-06-05 01:00:34.510 INFO [Thread-261248][PutuoHandle.java:104] - list send end, listSize:5, sendTime:1464ms
2020-06-05 01:00:48.939 INFO [Timer-0][PutuoHandleThread.java:29] - area=>PT_AREA cameraType=>HK_TP groupCount=>3
2020-06-05 01:00:48.939 INFO [Timer-0][DbUtil.java:118] - getLastMaxId, cameraType:HK_TP, area:PT_AREA
2020-06-05 01:00:48.940 INFO [Timer-0][DbUtil.java:129] - sql=SELECT maxid FROM t_flag_info WHERE cameraType = ? AND area = ?, 1:HK_TP, 2:PT_AREA';
my $regex = qr/\"Id\":"(\d+)","LocalTime":"(\d+)"/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