%% Replace Multiple Substrings
% Replace carriage returns with newline characters.
% Starting in R2017a, you can create strings using double quotes.

str = ["Submission Date: 11/29/15\r";
       "Acceptance Date: 1/20/16\r";
       "Contact: john.smith@example.com\r\n"]

%
% Replace the carriage returns.

old = {'\r\n','\r'};
new = '\n';
newStr = replace(str,old,new)

% Copyright 2012 The MathWorks, Inc.