Regular Expressions 101

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
.+(?=\.[^.]+$)
/
gm

Description

Description

Exclude extension from file basename - get filename only!

BASENAME = FILENAME.EXTENSION

Submitted by Cober@Axterbach - 5 years ago