I have this as my input
content = 'abc.zip'\n
I want to take out abc out of it . How do I do it using regex in python ?
Edit :
No this is not a homework question . I am trying to automate something and I am stuck at a certain point so that I can make the automate generic to any zip file I have .
os.system('python unzip.py -z data/ABC.zip -o data/')
After I take in the zip file , I unzip it . I am planning to make it generic , by getting the filename from the directory the zip file was put in and then provide the file name to the upper stated syntax to unzip it
'abc'you want removed? Or is it everything before the dot? Is this a filename, or just a random string? The best tool for the job (almost certainly not regular expressions) depends on these details.homework.content = 'abc.zip'\n(with that newline outside the quotes) orinput = r"content = 'abc.zip'\n"?ZipFile.extractall()sounds like a better plan!