Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
%(?'flag'[-0+ #]{0,3})(?'minwidth'[0-9]*)(?'comma'\.)?(?'precision'(?('comma')[0-9]*))(?'length'[hlqLjzZt]|ll|hh)?(?'type'[dscuobS%nfeEgGaACDiIOUpXx]{1})
/
gm

Description

A regex that matches the printf C99 standard

Submitted by renardfute - 2 years ago