Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
([a-zA-Z0-9_]+)\s?(\([a-zA-Z0-9_\s,*]*\))?\s?\{\s?(.*)\s?\}\s?
"
gm

Description

Useful for getting codeblock from a text

Submitted by anonymous - 2 years ago