for every c in choices split into words, concatenate prefix, result of the function re.escape with an argument c and suffix,
return "|" . join ( prefix + re . escape ( c ) + suffix for c in choices . split ( ) )