Regular Expressions 101

Community Patterns

File Extension

0

Regular Expression
ECMAScript (JavaScript)

/
^.*?((?:\.\w+)+)$
/

Description

Get the file extension from a path regardless of dots in folder names leading to the file

Submitted by Louis Capitanchik - 8 years ago