Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^(?:[^<>:;,?"*|/.\n]+(?=\.?|$)|[^<>:;,?"*|/\n]+)
/
gm

Description

Selects only the filename of a file, including dotfiles.

Submitted by anonymous - a year ago (Last modified 4 months ago)