Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Community Library
Search community submissions...
x
Filename without extension
Open Workspace
JavaScript
Match
Updated 2024-05-26 12:48
0
Regular Expression
/
^
(?:
[^
<>:;,?"*|/.
\n
]
+
(?=
\.
?
|
$
)
|
[^
<>:;,?"*|/
\n
]
+
)
/
gm
Description
Selects only the filename of a file, including dotfiles.
Submitted by
Anonymous