Regular Expressions 101

Community Patterns

Single percent symbols, that NOT corresponds to C++ printf format

1

Regular Expression
PCRE (PHP <7.3)

/
(?:[^%]|%%)+(%)(?!%|(?<flags>[-+#0])?(?<width>\d+|\*)?(?:\.(?<precision>\d+|\*))?(?:(?<specifier>[diuoxXfFeEgGaAcspn]))|(?<length>[hljztL]|hh|ll)(?P=specifier))
/
g

Description

no description available

Submitted by Zak - 8 years ago