First, you can make the regex only match \0
when it follows something other than \
$ echo '320.48k\\02. Easy Listening' | sed 's/\([^\\]\)\\0/\1 /g'
320.48k\\02. Easy Listening
That fixes the problem, but it fails when \0
is at the start of the line, so make the preceding match optional:
$ echo '\0320.48k\\02. Easy\0Listening' | sed 's/\([^\\]\)\?\\0/\1 /g'
320.48k\ 2. Easy Listening
This doesn't work though, because \\0
can match the regex with zero occurences of the parenthesised sub-group.
Another alternative is to say the \0
must either come at the start of the line, or the preceding character must not be \
$ echo '\0320.48k\\02. Easy\0Listening' | sed 's/\([^\\]\|^\)\\0/\1 /g'
320.48k\\02. Easy Listening
(As a comment points out, this still gives the wrong result for odd numbers of backslashes.)