← GalleryTV Series filename parsing✨ Emoji Combos/^((?<ShowNameA>.*[^ (_.]) [ (_.]+ (?!720p|1080p|264|265)
(
# Shows with preceding Year
#(?<ShowYearA>\d{4}) ([ (_.]+ (
(?<ShowYearA>(?:19|20)\d{2}) ([ (_.]+ (
(?<SeasonA>\d{1,2})x(?<EpisodeA>\d{1,2})
|(?<SeasonB>[0-3]?[0-9])(?<EpisodeB>\d{2})
|S(?<SeasonC>\d{1,2})E(?<EpisodeC>\d{1,2}) ) )?
| # Shows without preceding Year
(?<!\d{4})(
S(?<SeasonD>\d{1,2})E(?<EpisodeD>\d{1,2})
|(?<SeasonF>[0-3]?[0-9])(?<EpisodeF>\d{2})
|(?<SeasonE>\d{1,2})x(?<EpisodeE>\d{1,2}))
)
|(?<ShowNameB>.+))
/mgxiPCRE+310 years ago✓ Pre-loaded
About this regex
Parses TV series filenames to extract the show name, an optional air year, and season/episode numbers. It recognizes common episode notations such as S01E02, 1x02, and the 3-4 digit 0102 form, while skipping resolution/codec markers like 720p, 1080p, 264, and 265 via a negative lookahead. Uses named capture groups (ShowNameA/B, Season, Episode, ShowYear) making it ideal for media library tools that rename or organize episode files.