Non-greedy matching in routes?

I am trying to create a route in Rails 3 that matching a url that
consists of a country region and the title of the story.

So a url would look something like this:

I created the following route:

match ‘/:region-:story’ => ‘story#show’, :as => :show

but in the above example I see in the server log it is matching it
like so:

Parameters: {“region”=>“gb-this-is-the-title-of-the”,

How would you set this to use a non-greedy match on the hyphen so that
region will be “gb”?

Thanks in advance!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs