Skip to content

Instantly share code, notes, and snippets.

@cfedde
Created March 10, 2014 21:57
Show Gist options
  • Save cfedde/9475313 to your computer and use it in GitHub Desktop.
Save cfedde/9475313 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use Modern::Perl;
use YAML;
my $line = "08/15/2013, 15:58:47: (1234-567890) Changes made: Service end changed to 9999-12-31 (was 2013-10-12), Payment end changed to 9999-12-31 (was 2013-09-15), Renewal changed to 2013-09-12 (was 9999-12-31), srvid#=33324 modified by: Someguy Testuser (TST)";
my $re = qr|(?x)
(?<date> \d+/\d+/\d+),\s+
(?<time> \d+:\d+:\d+):\s+
\( (?<acct> \d+-\d+) \) \s+
|;
$line =~ /$re/;
say Dump \%+;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment