Feature Requests: Browse | Submit New | Admin

[#22319] Routes should accept Regexp objects

Date:
2008-10-07 05:07
Priority:
3
Submitted By:
Sean Bradly (rhythmx)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Routes should accept Regexp objects

Detailed description
I'd like to have the full power of a regex when creating the routes. The main use I have for it right now is to use
repetitions of groups to match extensions anywhere in a directory tree.

get '/*.rthml' {'hi'} # won't match /mydir/index.rhtml

get /(.*)\.rhtml/ {'hi'} # would

This kind of approach would work really well for a simple app that just needs a bunch of ERB files to be pulled from
disk, executed and return.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item