Replace all colons (':') with newlines in $list and search for the first match to the regex "^$removepat\$" where $removepat is a variable and save the result to variable 'removestr'
removestr=$(echo "$list" | tr ":" "\n" | grep -m 1 "^$removepat\$")