Regular Expressions 101

Community Patterns

Community Library Entry

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 - 10 years ago