[SalesForce] start new line after .(dot) symbol.

I'm copying data from RichText Area field to Text Area field,When I copied in Text area field,The data is displaying with HTML tags. So used below code to convert,

String.replaceAll('\\<.*?\\>', '');

It is working fine,but now I want to start new line after .(dot) symbol.

Best Answer

You can use the newline \n character to insert a new line in a text area field.

Something like the following should work:

String.replace('.', '.\n');
Related Topic