Regular Expressions 101

Community Patterns

Regex Groups

1

Regular Expression
PCRE (PHP <7.3)

/
\bAssert\.Equal\(\K\h*((?(R)[^()]*(?:\((?1)\)[^()]*)*|[^,()]*(?:\((?1)\)[^(),]*)*))\h*,\h*((?1))\h*(?=\))
/
g

Description

Complicated Example changing 2 values in a found string

Submitted by anonymous - 8 years ago