Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(import|from)\s((\w+(,\s)?)*)
/
gm

Description

this regex with find the files/modules imported into a python file

Submitted by anonymous - 4 years ago