Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
\s(?:(?:\w+::)*(\w+)(?:<[\w, ]+>){0,1}::){0,1}(\w+)[(]
/
gm

Description

it filters out most of the information and leaves the class name and the function name.

in case of function without class, it will capture namespace and function name.

Submitted by anonymous - 4 years ago