I have this line that I want to use sed on:
--> ASD = $start ( *.cpp ) <--
where $start is not a varaiable, I want to use sed on it a
Backslash works fine. echo '*.cpp' | sed 's/\*//' => .cpp
If you're in a shell, you might need to double escape $, since it's a special character both for the shell (variable expansion) and for sed (end of line)
echo '$.cpp' | sed "s/\\$//" or echo '$.cpp' | sed 's/\$//' => '.cpp'
Do not escape ( or ); that will actually make them them special (groups) in sed. Some other common characters include [ ] \ . ?
This is how to escape your example:
sed 's/ASD = \$start ( \*\.cpp )/ASD = $dsadad ( .cpp )/' somefile