Removing Line Break 

Hello all,

I work on a project. There is a comment page that people can comment and there is a report page that fetch the comment data from the comment page. While they are entering their comment if people use line breaks (enter space) , the report page of its structure is broken. That's why I need to remove this space from their comments.

If I give an example, a comment should NOT be like that ;

Lorem ipsum dolor sit amet

1-) consectetur adipiscing elit, 

sed do eiusmod tempor incididunt

 2-)ut labore et dolore magna aliqua. 

It should be ;

Lorem ipsum dolor sit amet consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et olore  magna aliqua. 

Two solutions comes to my mind. One of these is before saving a comment, replace enter space to normal space " ". The other one is, when fecthing data, I could fix it the same way.

But I need help for this. I don't know how I can find line breaks (enter space) or replace it or can you share to me if there is a  better solution ? 

Thank you.


Hi Emre,

There's the built-in "Replace" Action that you can use. Depending on the operation system used (Mac or Windows), line breaks will be Chr(10) or Chr(13) + Chr(10).

Thank you for your help. Chr(10) worked.


Glad I could be of help! Happy coding :).

I used this pattern (\t|\n|\r). It worked like a charm!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.