Class | Rack::Mount::RegexpWithNamedGroups |
In: |
lib/rack/mount/regexp_with_named_groups.rb
|
Parent: | Regexp |
A wrapper that adds shim named capture support to older versions of Ruby.
Because the named capture syntax causes a parse error, an alternate syntax is used to indicate named captures.
Ruby 1.9+ named capture syntax:
/(?<foo>[a-z]+)/
Ruby 1.8 shim syntax:
/(?:<foo>[a-z]+)/