There is a student assignment file with a file naming pattern like this:
160608726_Task Basic Programming_02_02.pdf
200610612_Task PTI_12_01.xls
180609074_Task Industrial Automation 1_04_04.doc
I want to identify the Student ID Number owner of the file, the batch of the student, what is the name of the course, what week and what extension the file is.
Student batch are obtained from 2 first numbers(example : 20 , then the year is 2020, if 18, then the year is 2018)
Output program for 200610612_Task PTI_12_01.xls file name:
This assignment belongs to a student with Student ID Number 200610612.
These students are the 2020 batch.
The subject is PTI
This assignment is for the 12th week
The courses are held in semester 1
This file extension is xls.
I have tried several syntax, the last syntax is
txt = "200610612_Tugas PTI_12_01.xls"
x = re.findall (r"\d{2}", 'txt')
print (x)
but the output is [].