Regular Expressions 101

Community Patterns

IsMethod

0

Regular Expression
PCRE (PHP <7.3)

/
(?:((\babstract\b\s)?)(T\s|\w+<?\w+<?\w+>?>?\s)(\w+<T>|[a-zA-Z0-9]+)(\(.*\))(\s=>\s\w+)?)
/
g

Description

Matching the lines that are methods

Submitted by Gabriel Marius Popescu - 7 years ago