title: Match of carriage return, line feed and multiple space in javascript regular expression
body: <p>I am trying replace carriage return (\r) and newline (\n) and more than one spaces ('  ' ) with single space.</p>
  
  <p>I used \W+ which helped to achieve this but, it's replacing special characters also with space. I want to change this only replace above characters.</p>
  
  <p>Please help me with proper regular expression with replace method in javascript.</p>