Ruby regex is ignoring # character
<p>I have the following string in Ruby</p>

<pre><code>"  # config.autoload_paths = $(lib)\n"
</code></pre>

<p>I get a match when I try a regex match using the following</p>

<pre><code>/\s*config.autoload_paths\s*=/
</code></pre>

<p>I'm not sure why this is a match though.  I expected the <code>/\s*c</code> part at the front of the regex to cause a match failure because of the <code>#</code> character in the string.  Any ideas why this is matching?</p>