To match all non-alphanumerics, use
[^[:alnum:]]. It's similar to
[^abc]: the leading caret makes the bracket expression match all but the listed characters.
To match a literal dash, you need to make sure it's not interpreted as creating a list of characters to match. Make it the first character of the bracket expression:
Note that sed doesn't take the
/ as a separator for
s/// if it's within a bracket expression, so there's no need to put a backslash in front of it. (The backslash will match itself.) E.g.
echo 'a\b/c' | sed 's/[/\]/./g' prints
See for example the
regex(7) man page for a description of the regular expression syntax. (Note that it mainly discusses extended regular expressions (ERE), used by
sed -E in many/most seds.)