Created
January 31, 2018 19:25
-
-
Save preaction/601b82853328c513149a98d4a0305647 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.24; | |
use warnings; | |
my $message = 'this is a log message endofmessage;dept_id=neteng'; | |
my $trunc = $message =~ s/\s*;?(?:[^=;\s]+=[^;=\s]+(?:[ ;]|$))+//r; | |
say "Message: $message"; | |
say "Trunc: $trunc"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment