tag2delim function

change a delimiter tag into two escaped characters