skip files without date if mo =nonecontinue get the different parts of the filename beforepart mo group( monthpart mo group( daypart mo group( yearpart mo group( afterpart mo group( --snip-if the match object returned from the search(method is none then the filename in amerfilename does not match the regular expression the continue statement will skip the rest of the loop and move on to the next filename otherwisethe various strings matched in the regular expression groups are stored in variables named beforepartmonthpartdaypartyearpartand afterpart the strings in these variables will be used to form the european-style filename in the next step to keep the group numbers straighttry reading the regex from the beginningand count up each time you encounter an opening parenthesis without thinking about the codejust write an outline of the regular expression this can help you visualize the groups here' an exampledatepattern re compile( """^( all text before the date ( ( )one or two digits for the month ( ( )one or two digits for the day ( ( four digits for the year ( )all text after the date """re verboseherethe numbers through represent the groups in the regular expression you wrote making an outline of the regular expressionwith just the parentheses and group numberscan give you clearer understanding of your regex before you move on with the rest of the program step form the new filename and rename the files as the final stepconcatenate the strings in the variables made in the previous step with the european-style datethe date comes before the month fill in the three remaining todos in your program with the following code#python renamedates py renames filenames with american mm-dd-yyyy date format to european dd-mm-yyyy --snip-