Regular Expressions 101

Function arguments regex

Open Workspace
  • PCRE (Legacy)
  • Match
0

Regular Expression

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

Description

A simple regex to match individual arguments of a function.

Submitted by Anonymous