Regular Expressions 101

Community Patterns

get the body of a python function and its arguments

1

Regular Expression
PCRE (PHP <7.3)

/
(def*\W(\w+)([\w\W]*?))(?=(def)|$)
/
g

Description

no description available

Submitted by Ethan Riley. - 8 years ago