Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
{[ \t]*foreach[ \t]*\$(_*[A-Za-z]+[A-Za-z0-9_]*)[ \t]*as[ \t]*\$(_*[A-Za-z]+[A-Za-z0-9_]*)(?:[ \t]=>[ \t]*\$(_*[A-Za-z]+[A-Za-z0-9_]*))?[ \t]*}(.*){[ \t]*\/foreach[ \t]*}
/
Uis

Description

no description available

Submitted by anonymous - 10 years ago