Regular Expressions 101

Community Patterns

find filename in full path

0

Regular Expression
ECMAScript (JavaScript)

/
(?=~\/|\.\/|\..\/|\/|file:\/\/\/|\w)[\w\-\._\(\)\[\] ]+$
/
gim

Description

Finds the filename when given a full path.

Submitted by ground0hg - a year ago