Community Patterns

Community Library Entry

0

Regular Expression
Created·2018-07-04 07:11
Flavor·Python

r"
__([a-zA-Z_]+)__\s*=\s*(?:\"|')((?<=\").+(?=\")|(?<=').+(?='))
"
gm
Open regex in editor

Description

Regex string that can pull package metadata from python file when its stored in this method:

mymeta = 'some meta string'

Submitted by anonymous