use strict;
my $str = 'Change 193745 by mnghiem@vanquan__VIETW462__ROM on 2020/05/13 06:08:50 :\\thuy_unreal\\ROM Client stream: //Romeo/virtuosSubmit Current directory: c:\\Users\\thuy.nguyen Peer address: 192.1
[Lighting] Virtuos updated bake light for seq030 4/1/root Server date: 2020/05/20 04:29:58 -0500 CDT Server uptime: 821:40:43 Server version: P4D/LINUX26X86_64/201
Affected files ... crypted Broker cert expires: Apr 3 20:48:58 2022 GMT Broker version: P4BROKER/LINUX26X86_64/2020.1/1953492 Broker
... //Romeo/main/UnrealEngine/Project/Content/CinematicDemo/SubLevels/Lighting/CDemo_ESP_sq030_1:25:01 2022 GMT Broker version: P4BROKER/LINUX26X86_64/2019.2/1897966 Proxy address: P4ROM:1667 Proxy version: P4LGT.umap#16 edit 021/02/24) (expires 2020/06/14) Server license-ip: 192.168.3.4:2003 Case Handling: sensitive
... //Romeo/main/UnrealEngine/Project/Content/CinematicDemo/SubLevels/Lighting/CDemo_ESP_sq030_LGT_BuiltData.uasset#9 edit 5_050/sq035_050_LGT.uasset#12 edit
Differences ...
==== //Romeo/main/UnrealEngine/Project/Content/CinematicDemo/SubLevels/Lighting/CDemo_ESP_sq030_LGT.umap#16 (binary+l) ==== 0/sq030_LGT.uasset#18 edit
==== //Romeo/main/UnrealEngine/Project/Content/CinematicDemo/SubLevels/Lighting/CDemo_ESP_sq030_LGT_BuiltData.uasset#9 (binary+l) ====';
my $regex = qr/(Change )(.*)( on)|(^\.\.\.)(.*)/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