Regular Expressions 101

Community Patterns

Simple Linux File Absolute Path Tester

4

Regular Expression
PCRE (PHP <7.3)

/
^(\/[\w-]+)+(.[a-zA-Z]+?)$
/

Description

Match simple linux file absolute path as /usr/share/my-folder/helloworld.jpg

Submitted by FLonpl6 - 9 years ago