Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
[^,()]+(?:\((?:(?R)(,(?R))*|[^,()]+|)\))?
/
g

Description

A simple regex to match individual arguments of a function.

Submitted by anonymous - 2 years ago