Help with removing parts of log output

On Linux, the following will work, where these are a literal newline and ctrl/M in the string.

mutate { 
gsub => [ "message", "[
^M]", "" ]
}