Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use v6;
- grammar PTN {
- token TOP { [ <season> <episode> | <resolution> | <title> | <stuff> ]*}
- token title { <[\w \s]>+ }
- token season {\s? 'S' \d\d }
- token episode { 'E' \d\d \s? }
- token resolution {\s? \d\d\d 'p' \s? }
- token stuff { <[\w \d \- \[ \] ]>}
- }
- my $torrent = 'The Walking Dead S05E03 720p HDTV x264-ASAP[ettv]';
- my $match = PTN.parse($torrent);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement