Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
foreach\((?<loop>[a-zA-Z0-9-. _\(\)]+)\n{(?<code1>[a-zA-Z0-9-. _\;\n(\){}]+)await(?<code2>[a-zA-Z0-9-. _\;\n(\){}]+)}
/
gm

Description

async calls in foreach loop, search by await keyword found in foreach

Submitted by mmateeva - 2 years ago