1. Find: \s{2,}
Replace:
,
Find 2 or more spaces in a row
Replace with a comma
2. Find: (\w+), (\w+), (.*)
Replace:
\2 \1 (\3)
3. Find: (.mp3)(\s)
Replace:
.mp3 \n
4. Find: (\d{4}) (.*)(.mp3)
Replace:
\2_\1.mp3
Find 4 digit number followed by all the rest until .mp3
Replace starting the line with the middle text add an underscore followed by the 4 digit number .mp3
5. Find:
(\w{1})(\w+),(\w+),(\d+.\d),(\d+)
Replace:
\1_\3,\5
Find the first letter then rest of the word until a comma then the second word until comma then number with decimal comma and the final number
Replace starting with first letter followed by an underscore and the second word then comma and the final number
6. Find: (\w{1})_(\w{4})(\w+),(\d+)
Replace: \1_\2,\4
Find the first single letter followed by an underscore then identify the first 4 letters of the first word then the rest of the word followed by a comma and number
Replace with the first letter, underscore, then the first 4 letters followed by a comma and the number
7. Find:
(\w{3})(\w+),(\w{3})(\w+),(\d+.\d),(\d+)
Replace:
\1\3, \6, \5
Find the first three letters then the rest of the word until a comma, do the same of the next word. Then identify the number with a decimal and the second whole number seperated by a comma
Replace with the first 3 letters of each word together with no space then comma followed by the whole number - comma - then the decimal number
8. Find: NA,
Replace:
0,
replace NA with 0
I question my own decision here because NA does not necessarily equal zero but this felt more appropriate to the assignment than just deleting any row that contained NA
Find: _
Replace: ~
This is a step I applied only to the first line after trouble shooting removing special characters in the bombus_spp and host_plant columns. The tilde was not used anywhere else so would be easy to swap back after making other edits
Find: [^,/.a-zA-Z\d\s\~:]
Replace:
blank
Find any character that is NOT a comma, backslash, period, upper/lowercase letter, number, space, or tilde. Remove them.
Find: \s,
Replace: ,
Find any commas with a space before them and remove the space
Find: ~
Replace: _
Replace the tildes in the first line that were used as a placeholder