Regular Expressions 101

Community Patterns

Catch Directives

1

Regular Expression
PCRE (PHP <7.3)

/
\B@(\w+)([ \t]*)(\( ( (?>[^()]+) | (?3))* \))?({(.*?)})?
/
x

Description

Catch directive and anything inside {} @widget('x') { test }

Submitted by John Turingan - 8 years ago