Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?<is_hidden>\.?)(?:(?<timestamp>\d+)\-)?(?<name>[\w\x27\s]+\-?)+\-(?<content_removed_version>\d+(?:\(\w+\))?)(?<extensions>[\.[[:alpha:]]+\.?)*$
/
g

Description

Matches the most advanced filename for a given version as per my file naming conventions.

Submitted by Robert Larkins - 2 years ago