Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-01-26 13:43
Flavor·PCRE2 (PHP)

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

Description

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

Submitted by Robert Larkins