Regular Expressions 101

Community Patterns

Find all PHP short echo tags

1

Regular Expression
PCRE2 (PHP >=7.3)

/
<\?=((?:(?!\?>).)+)\?>
/
gm

Description

Find all short echo tags and convert to Laravel Blade echo brackets {{ }}

Submitted by matasbi - 8 months ago