What delimiters can you use in sed?
We normally see people complaining about the unknown option to s' error in sed when they want to use a pattern that contains the sed delimiter. For example, if we are using / : $ var="hel/lo" $ sed "s/a/$var/g" <<< "haha" sed: -e expression #1, char 9: unknown option to `s' So we advise to use another delimiter, for example | : $ sed "s|a|$var|g" <<< "haha" hhel/lohhel/lo However, I want to know what are the possible delimiters sed can accept... since it seems to be almost any character including regex-like ones ( * , ? , . , ...)! In my sed (GNU sed) 4.2.2 : $ sed 's/a/b/g' <<< "haha" hbhb $