title: Regex issue with SingleLine Option and \n before end of string
body: <p>I am trying to match a certain end of a file, where the "certain end of the file" could go over multiple lines.</p>
  
  <p>My regex looks like follows:</p>
  
  <pre><code>"\s\w$" 
  </code></pre>
  
  <p>What I want to do: Find all files that end with a whitespace character, followed by a "human readable character" at the very end of the file.</p>
  
  <pre><code>Regex.IsMatch("arbitrarytext a\n",@"\s\w$")
  </code></pre>
  
  <p>Problem is it matches the following string also:</p>
  
  <pre><code>"arbitrarytext a\n"
  </code></pre>
  
  <p>I also tried RegexOptions.SingleLine - although this should only change the matching behavior of a dot ".".</p>
  
  <p>How can I rewrite my regex that it still fulfills my needs but does not match the example given above.</p>
  
  <p>Secondly I'm also interested in an explanation why it matches the example at all.</p>
  
  <p>Using: .Net 3.5 SP1 if that is of interest.</p>