Regular Expressions 101

Community Patterns

Nested Exception Thrower

1

Regular Expression
PCRE (PHP <7.3)

/
(\s*\}\s*catch\s*\(\s*\w+\s+(?<ErrName>\w+)\s*\)\s*\{\s*)m_log.error\s*\(\s*\g'ErrName'\s*\)\s*;\s+(throw\s+new\s+(?:\w+)\s*\(\s*"[^;]+(?=[)];))
/
gs

Description

no description available

Submitted by anonymous - 8 years ago