I want to have two different type of newline so I can print a string which looks like it has multiple newlines but gives me a way to differentiate between them. I want to have string with newlines in them and look them up using
RegularExpresssion["...\n...\r..."]->.... Basically there will be a huge string with mix of hard and short returns then I will have a bunch of
\n will be captured and replace by something and
\r by something else.
- Is there a way to have hard and soft returns in a Mathematica string?
- If I should write a string like
"sdfsdf\nadsad\rasdasd", is there a function, say
StringPrint["sdfsdf\nadsad\rasdasd"], which will convert the
"\r"to their print form? Note: For this I want to do inline evaluation by first selecting and pressing
Enter is the keybinding for
\[Newline] which is
\n but since
Shift+Enter is reserved for evaluation while it is a standard key for soft return
\[Newline] equivalent for
\r can be found that would still make the life easier as well.