This is my text:
import {
SiteContext,
get,
} from 'Base'
import {
Brands,
Courses,
CtaSection,
Download,
Hero,
Newsletter,
Posts,
Stats,
Teachers,
Features,
Testimonials,
} from 'Index'
const Index = () => {
And this is my python code to get the list of named imports:
imports = re.findall("^import\s*\{([^\}]*)}", Global.content)
for item in imports:
print(item)
But all I get is this:
SiteContext,
get,
Why do I not get the other part too? I tested my regex with regex101.com and it works just fine there.