Hello. I can use the ST-API 'find_all' method to locate 'import' or 'from' statements from a Python file. I want to then use regex to extract the library names. For example:
import lib1, lib2
from lib3 import type3
import lib4 as bob
from lib5 import ted as edward, dave as david
I want to obtain 'lib1', 'lib2', but I also want 'lib3' together with 'type3'; that is, to be able to consider them as a paired-item.
Firstly, how can I grab 'lib1' and 'lib2'? I'm hoping a regex-whiz can point me in the right direction