Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^.*[\/\\](?<FileNameWithoutExtension>.*)\.(.*)$
/

Description

THE BEST RegEx for extracting filename without extension and extension from any path

Submitted by anonymous - 2 years ago