Regular Expressions 101

Community Patterns

Community Library Entry

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 - a year ago (Last modified a year ago)