How to replace \ or / with sed?

advertisements

How to replace / or \ in text file? I have tried to 'escape' these characters but with no success so far

echo '/// \\' | sed 's////some_text/'

will obviously not work.

thanks BM


echo "\\\message\//" | sed 's;[\/];REPLACEMENT-TEXT;g'