Question 1:

Find:\s{2,}

Replace:,

This regular expression finds sections of the text that contain 2 or more spaces and then it replaces them with a comma.

Question 2:

Find:(\w+), (\w+), (.*)

Replace:\2 \1 (\3)

This regular expression captures the last name using the first (\w+), the first name using the second (\w+), and the school name using the (.*). Then it uses those captures to restructure the list in the desired format of Bryan Ballif (University of Vermont).

Question 3:

Find:.mp3\s

Replace:.mp3\n

This regular expression finds every instance of a space after “.mp3” and replaces the space with a line break to create a line for each song.

Question 4:

Find:(\d{4})\s(.*)(.mp3)
   
Replace:\2_\1\3

This regular expression captures the four digit number using the (\d{4}), the text after the number and before the “.mp3” using the (.*), and the “.mp3” using the (.mp3). Then it restructures these captures into the desired format with the “_” in between the track name and the four digit number.

Question 5:

Find:(\w)\w+,(\w+),\d+.\d,(\d+)
  
Replace:\1_\2,\3

This regular expression captures the first letter of the genus and avoids the rest using the (\w)\w+. Then the entire species name is captured using the (\w+). The first numeric variable is found using \d+.\d, and the second numeric variable is captured using the (\d+). Then it restructures these captures into the desired format of C_pennsylvanicus,44.

Question 6:

Find:(\w)\w+,(\w{4})\w+,\d+.\d,(\d+)
     
Replace:\1_\2,\3

This regular expression captures the first letter of the genus like in Question #5. However in Question #6, we only want to capture the first four letters of the species name, not the entire species name. This is done using (\w{4})\w+. The second numeric variable is again captured like in Question #5. Then it restructures these captures into the desired format of C_penn,44.

Question 7:

Find:(\w{3})\w+,(\w{3})\w+,(\d+.\d),(\d+)
     
Replace:\1\2, \4, \3

This regular expression captures the first three letters of the genus using (\w{3})\w+, the first 3 letters of the species using (\w{3})\w+, the first numeric variable using (\d+.\d), and then the second numeric variable using (\d+). Then it restructures these captures into the desired format of Campen, 44, 10.2.