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 - 2 years ago (Last modified 6 months ago)