Regular Expressions 101

Community Patterns

123...7

Get python function declaration

0

Regular Expression
Rust

r"
(?P<function>def\s+(?P<function_name>\w+)\s*\((?P<parameters>(?:.|\n)*?)\):\s*(?:\n[ \t]+.*?)*\n)
"
g

Description

Gets the python function declarations

Submitted by anonymous - a year ago