hello friend i am cleaning some response from server becouse i dont have time to search all php files, space and line break in output, from buffer php...
in a response of ajax i get a paragraph of text, and i need remove all space and line break before anyone character and respect all: space and line break.
response = response.replace(/\s+/g, '');
Solved with this Update. regex
response = response.replace(/^\s+|\s+$/g,'');