Regular expressions doubts : <p>I have a few doubts that I have not managed to clear up by research and am hoping for some help.</p>

<p>1) What does the <code>m</code> do, and what do the <code>/ /</code> before the m and at the end do?
        $var  =~  m/[^0-9]+/</p>

<p>2) <code>/[^0-9]+/</code> Which of the following lines does this regex match?</p>

<pre><code>     A) `123`

     B) `4`

     C) `I see 5 dogs`

     D) `I see five dogs`
</code></pre>

<p>My answer to 2): It matches <code>C</code> and <code>D</code>, and not <code>A</code> and <code>B</code> because there is no character or wold that does not contain <code>0-9</code>.</p>
