Regular Expressions 101

Community Patterns

Unix file name from full path

0

Regular Expression
PCRE (PHP <7.3)

/
^(.*)\/([^\/]*)$
/
g

Description

Replace the forward slashes with back slashes for Windows

Submitted by anonymous - 8 years ago