Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
^ # get the title of this movie or series (?P<title> [-\w'"]+ # match separator to later replace into correct title (?P<separator> [ .] ) # note this *must* be lazy for the engine to work ltr not rtl (?: [-\w'"]+\2 )*? ) # start of movie vs serie check (?: # if this is an episode, lets match the season # number one way or another. if not, the year # of the movie (?: # series. can be a lot prettier if we used perl regex... # make sure this is not just a number in the title followed by our separator. # like, iron man 3 2013 or my.fictional.24.series (?! \d+ \2 ) # now try to match the season number (?: s (?: eason \2? )? )? (?P<season> \d\d? ) # needed to validate the last token is a dot, or whatever. (?: e\d\d? (?:-e?\d\d?)? | x\d\d? )? | # this is likely a movie, match the year (?P<year> [(\]]?\d{4}[)\]]? ) ) # make sure this ends with the separator, otherwise we # might be in the middle of something like "1080p
"
gimx
Input 1
New
the.black.adder.3x01.dish.and.dishonesty.dvdrip.xvid-dvdiso.avi the.black.adder.3x02.ink.and.incapability.dvdrip.xvid-dvdiso.avi the.black.adder.3x03.nob.and.nobility.dvdrip.xvid-dvdiso.avi the.black.adder.3x04.sense.and.senility.dvdrip.xvid-dvdiso.avi the.black.adder.3x05.amy.and.amiability.dvdrip.xvid-dvdiso.avi the.black.adder.3x06.duel.and.duality.dvdrip.xvid-dvdiso.avi Game.of.Thrones.S04E08.720p.HDTV.x264-KILLERS Futurama.S06.720p.BluRay.X264-REWARD-SiNNERS The.Grand.Budapest.Hotel.2014.1080p.BluRay.x264-BLOW Another.Earth.2011.LIMITED.720p.BluRay.X264-AMIABLE Game.of.Thrones.S04E09.720p.HDTV.x264-KILLERS The.Green.Mile.1999.720p.BluRay.x264-HDCLASSiCS Cosmos.A.Space.Time.Odyssey.S01E12.720p.HDTV.X264-DIMENSION Game.of.Thrones.S04E10.720p.HDTV.x264-KILLERS The Road 2009 Bluray DTS 720 p - TRiNiTY Dead Poets Society (1989) 720p Blu-ray x264 DTS MSubs [DDR] Garden.State.2004.720p.BluRay.X264-AMIABLE The.Royal.Tenenbaums.2001.1080p.BluRay.X264-AMIABLE Donnie.Darko.2001.1080p.PROPER.
Extraction
the.black.adder.3x01.dish.and.dishonesty.dvdrip.xvid-dvdiso.avi the.black.adder.3x02.ink.and.incapability.dvdrip.xvid-dvdiso.avi the.black.adder.3x03.nob.and.nobility.dvdrip.xvid-dvdiso.avi the.black.adder.3x04.sense.and.senility.dvdrip.xvid-dvdiso.avi the.black.adder.3x05.amy.and.amiability.dvdrip.xvid-dvdiso.avi the.black.adder.3x06.duel.and.duality.dvdrip.xvid-dvdiso.avi Game.of.Thrones.S04E08.720p.HDTV.x264-KILLERS Futurama.S06.720p.BluRay.X264-REWARD-SiNNERS The.Grand.Budapest.Hotel.2014.1080p.BluRay.x264-BLOW Another.Earth.2011.LIMITED.720p.BluRay.X264-AMIABLE Game.of.Thrones.S04E09.720p.HDTV.x264-KILLERS The.Green.Mile.1999.720p.BluRay.x264-HDCLASSiCS Cosmos.A.Space.Time.Odyssey.S01E12.720p.HDTV.X264-DIMENSION Game.of.Thrones.S04E10.720p.HDTV.x264-KILLERS The Road 2009 Bluray DTS 720 p - TRiNiTY Dead Poets Society (1989) 720p Blu-ray x264 DTS MSubs [DDR] Garden.State.2004.720p.BluRay.X264-AMIABLE The.Royal.Tenenbaums.2001.1080p.BluRay.X264-AMIABLE Donnie.Darko.2001.1080p.PROPER.