The script will be used to:
- Remove white-space from start and end position.
- Convert 2 or more spaces to 1.
- Exclude newline with a start spacing.
Pictorial Presentation
Live Demo
See the Pen javascript-regexp-exercise-6 by w3resource (@w3resource) on CodePen.
-min.png)