Regular Expressions 101

Community Patterns

Override filename to flag as upload placeholder

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^UPLOAD\|(?'name'.+)\|(?'label'.*)\|(?'required'REQUIRED)?$
/
gm

Description

UPLOAD signifies the purpose of the entry name and label are mandatory and extracted REQUIRED translates into the require attr on the upload element

Submitted by Russ Ferriday - a year ago