Laman
Home
Tutorial
Javascript: Remove Line Break and Double Spacing
For remove break line use:
text.replace(/(\r\n|\n|\r)/gm," ");
For remove double spacing use:
text.replace(/\s{2,}/g, ' ');
Sample code:
Place text here...
Process
Result here...
Demo:
Place text here...
Process
Result here...
No comments:
Post a Comment
Silahkan
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Silahkan