title: Routes regex constraint not working as expected with subgroup in Rails 4
body: <p>I have the following constraint:</p>
  
  <pre><code>get '/:name' =&gt; "products#show", :as =&gt; :product, :constraints =&gt; {name: /\w+(-\w+)*/}
  </code></pre>
  
  <p>The following URL:</p>
  
  <pre><code>/aa--aa
  </code></pre>
  
  <p>Will return a <code>No route matches [GET] "/aa--aa"</code></p>
  
  <p>But if I do <code>/\w+(-\w+)*/.match('aa--aa')</code> I will get a MatchData object.  So, how does Rails handles Regex constraints? Why is this not being consistent with <code>.match</code>?</p>