Created
April 23, 2018 18:29
-
-
Save sbstp/d03712eb35ede58ed5ed85dcb95e0992 to your computer and use it in GitHub Desktop.
This file contains 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
let m = Matcher::new(sequence([ | |
capture("series", many1(regex(r"^\w+$"))), | |
or([ | |
capture("season_episode", regex(r"^s\d\d?e\d\d?$")), | |
capture("season_episode", regex(r"^\d\d?x\d\d?$")), | |
sequence([ | |
capture("season", regex(r"^s\d\d?$")), | |
capture("episode", regex(r"^e\d\d?$")), | |
]), | |
sequence([ | |
capture("season", regex(r"^\d\d?$")), | |
capture("episode", regex(r"^\d\d?$")), | |
]), | |
capture("episode", regex(r"^e\d\d?$")), | |
]), | |
])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment