Skip to content

Instantly share code, notes, and snippets.

@achiurizo
Created December 9, 2010 20:22
Show Gist options
  • Save achiurizo/735269 to your computer and use it in GitHub Desktop.
Save achiurizo/735269 to your computer and use it in GitHub Desktop.
get %r{/\w+/} do
"Hello!"
end
get '/call/:number', :number => /\d+/ do
"Call #{params[:number]}"
end
get '/regex/:route/:data', :route => /\w+/, :data => /\d+/ do
"Route: #{params[:route]}, Data: #{params[:data]}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment