MATLAB: How to deleted Enter char

enter characterMATLAB

a = '
'MOVABLE,ERASABLE,
MERGEABLE'
a(18) = '
' % there hava a Enter char
I want to delete the Enter Char.
the way ('\n' or 'r' or '\r\n' ) is error. so how to delete the Enter char

Best Answer

a = regexprep(a, '[\r\n]', '')
or
a(ismember(a, [10 13])) = ''; %10 is newline, 13 is carriage return