I can do it with some auxiliary echo command but not with sed directly...
Code:
$ printf "1,2,3,4,"
1,2,3,4,$
$
$ printf "1,2,3,4,"|sed 's/\,$/4/'
1,2,3,44$
$
$ printf "1,2,3,4,"|sed 's/\,$/\n/'
1,2,3,4[COLOR=#EF2929]n[/color]$
$
$ printf "1,2,3,4,"|sed 's/\,$//';echo
1,2,3,4
$ { printf "1,2,3,4,"|sed 's/\,$//';echo; }
1,2,3,4
$