title: Regex in java: error for str.replace("\s+", " ")
body: <p>Why the java (1.7) gives me error for the following line? </p>
  
  <pre><code>String str2 = str.replace("\s+", " ");
  </code></pre>
  
  <p>Error: </p>
  
  <pre><code>Invalid escape sequence (valid ones are  \b  \t  \n  \f  \r  \"  \'  \\ )   
  </code></pre>
  
  <p>As far as I know "\s+" is a valid regex. Isn't it? </p>