• A company uses unique, 9-character codes that begin with a capital letter, followed by a hyphen (-), followed by 7
or 8 digits as employee ID numbers, in the format A-1234567 or A-12345678. Project reports submitted to the
company include the employee's ID number and a summary of the work they completed on the project.
A data analyst wants to pull all of the employee ID numbers out of these projects. Complete the find_eid
function to extract these employee ID numbers from the reports.
1
def find_eid(report):
2
pattern =
#enter the regex pattern here
3
result = re.
(pattern, report) #enter the re method here
4
return result
5
6
7
print(find_eid("Employees B-1234567 and C-12345678 worked with products X-123456urand Z-
8 print(find_eid("Employees B-1234567 and C-12345678, not employees b-1234567 and c-12345
Reset