Regular Expressions 101

Community Patterns

TV/Movie

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<Fname>.*\.)(S(?<se>\d{1,2})E(?<ep>\d{2,3}).*|(?<season>S\d{1,2}-S\d{2,3}).*|(?<yr>\d{4}[^p]).*)
/
g

Description

This is my first attempt so umm ya ..

Grab Filename: Fname Season: se Episode: ep Year: yr

Submitted by TheMorgue - 7 months ago (Last modified 7 months ago)