daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Nov 30th, 2017 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. grammar PTN {
  2.   7     token TOP { [<season><episode>
  3.   8     || <year>
  4.   9     || <resolution>
  5.  10     || <quality>
  6.  11     || <codec>
  7.  12     || <audio>
  8.  13     || <region>
  9.  14     || <extended>
  10.  15     || <hardcoded>
  11.  16     || <proper>
  12.  17     || <repack>
  13.  18     || <container>
  14.  19     || <widescreen>
  15.  20     || <language>
  16.  21     || <sbs>
  17.  22     || <unrated>
  18.  23     || <size>
  19.  24     || <threeD>
  20.  25     || <excess>]*
  21.  26     }
  22.  27
  23.  28     token excess { [\w+ \s? \w+ || \s? \w+ \s? || \-]+?  }
  24.  29     token season {\s? <[sS]> <[0..9]>**1..2  }
  25.  30     token episode { <[ex]> <[0..9]>**2 }
  26.  31     token year {\s? [ 19 <[0..9]>**2 || 20 <[0..9]>**2 ] \s? }
  27.  32     token resolution {\s?  \d ** 3..4 'p' \s? }
  28.  33     token quality { \s? WEB \-? DL \s? }
  29.  34     token codec { \s? [xvid || <[hx]> \.? 26 <[45]>] \s? }
  30.  35     token audio { \s? [MP3 || DD5 \.? 1 || Dual <[\- \s]> Audio || AAC <[. \-]> LC || AAC [\.? 2\.0]? || AC3 [\.5 \.1]?] \s? }
  31.  36     token region { R <[0..9]> }
  32.  37     token extended { \s? EXTENDED [\:? .CUT]? \s? }
  33.  38     token hardcoded { HC }
  34.  39     token proper { PROPER }
  35.  40     token repack { REPACK }
  36.  41     token container { \s? [MKV || AVI || MP4] \s? }
  37.  42     token widescreen { WS }
  38.  43     token language { \s? [rus \. eng || ita \. eng] \s? }
  39.  44     token sbs { \s? [Half \-]? SBS \s? }
  40.  45     token unrated { \s? UNRATED \s? }
  41.  46     token size { \s?  \d+ [\. \d+]? [GB || MB] \s? }
  42.  47     token threeD {\s? 3D \s? }
  43.  48 }
  44.  
  45.  50 my $torrent = 'San Andreas 2015 s03e12 UNRATED 1080p EXTENDED 3D 480MB Half-SBS MP4 WEB-DL x264 rus.eng R5 AAC-JYK';
  46.  51 my $match = PTN.parse($torrent);
  47.  52 say $match;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top