Regular Expressions 101

Community Patterns

Extract Laravel 5 service providers content

1

Regular Expression
PCRE (PHP <7.3)

/
('providers' => \[)([^[\]]*)(\n \],)
/
ig

Description

In intend to dynamically add service providers in the app.php config file

Submitted by Jonathan Bonnefoy - 8 years ago