Created
January 14, 2016 18:54
-
-
Save preaction/dc1efb4ac9c1b4532b58 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 strict; | |
use warnings; | |
no warnings 'experimental::smartmatch'; | |
my $text = <<ENDTEXT; | |
Řádek pro automatické zpracování: | |
DOMAINREN|domain.com|2342432|123432424|3242432 | |
ONLINE|stufandssssssssss | |
ENDTEXT | |
my @registry_patterns = ( | |
qr/^DOMAINREG\|([^\|]+)\|/m, | |
qr/^DOMAINREN\|([^\|]+)\|/m, | |
qr/^DOMAINTRAN\|([^\|]+)\|/m, | |
qr/^PROCESS\|DOMAINREG\|([^\|]+)\|/m, | |
qr/^PROCESS\|DOMAINUPD\|([^\|]+)\|/m, | |
qr/^PROCESS\|DOMAINTRAN\|([^\|]+)\|/m, | |
qr/^PROCESS\|DOMAINREN\|([^\|]+)\|/m, | |
qr/^PROCESS\|DOMAINCHG\|([^\|]+)\|/m, | |
qr/^\| subject of the change: change of the domain (\S+\.\S+)$/m, | |
qr/^\| subject of the change: change of the owner of the domain (\S+\.\S+)/m, | |
); | |
if ($text ~~ @registry_patterns){ | |
print "Matched: $1"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment