Regexp Question - Merb::Router

Daniel N has.sox at gmail.com
Fri Jul 13 03:22:54 EDT 2007


Hi,

I'm looking through the Merb::Routing code and I've found a regexp that I
can't figure out how it works.

Merb::Router::SECTION_REGEXP  #=> /(?::([a-z*_]+))/

It takes a route definition string, like "/products/:model/:id"  and
extracts the "model" string on the first pass, and later  the "id" string.

Can anyone shed some light on what the
?::
part does?  I haven't found it in any of the documentation for Ruby Regexps
that I've found.

Cheers
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070713/a37111cb/attachment.html 


More information about the Merb-devel mailing list